Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby lambda function

a = -> { 1 + 1 }
a.call
# => 2

a = -> (v) { v + 1 }
a.call(2)
# => 3
 
PREVIOUS NEXT
Tagged: #ruby #lambda #function
ADD COMMENT
Topic
Name
9+3 =