2 Matching Annotations
- Mar 2021
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
Would it be desirable to specify the new object in a block? That would make it somewhat symmetrical to how Hash.new takes a block as a default value.
-
- Apr 2020
-
www.w3schools.com www.w3schools.com
-
Why Use Lambda Functions? The power of lambda is better shown when you use them as an anonymous function inside another function. Say you have a function definition that takes one argument, and that argument will be multiplied with an unknown number: def myfunc(n): return lambda a : a * n Use that function definition to make a function that always doubles the number you send in:
Tags
Annotators
URL
-