|
|
|
|
|
by Aardappel
2639 days ago
|
|
Your Lobster version has a stray comma, it is: map(my_array) element: element * 2 Note how if you write this example with multiple statements instead of "elements * 2", suddenly the Lobster syntax looks a lot more consistent, and the Ruby example doesn't look that great as it looks completely different from the built-in for loop. |
|
That said, the Ruby syntax can be a bit bulky. Your syntax feels pretty clean TBH.