3 ms·
Blocks are just a convenient way to create and pass a proc. They aren’t a special data type. Lambdas and procs are similar. The only real differences are that
by actsasbuffoon 7y ago
Blocks are just a convenient way to create and pass a proc. They aren’t a special data type.
Lambdas and procs are similar. The only real differences are that lambdas check to see if they have the correct number of arguments, and returning inside a lambda returns from the enclosing scope.