Proc
-
Proc
square = ->(x : Int32) { x * x }
puts typeof(square) # Proc(Int32, Int32)
puts square.call(3) # 9
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help