|
|
|
|
|
by AlchemistCamp
1794 days ago
|
|
You may be "playing code golf", but I generally just use the capture syntax where the compactness aids readability. For example, a function that takes two arguments and returns their product could be written as fn x, y -> x * y end or &(&1 * &2) When used inside a map or reduce or when the function is a direct mathematical operation on its arguments, it can be a bit quicker to parse the capture syntax than the fn ... end syntax. |
|