Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
POST-dollar-sign
[1,2] map (item, index) -> (item * 10 + index)
var list = [1,2]
---
map(list, (item, index) -> (item * 10 + index))
map([1,2], (item, index) -> (item * 10 + index))
// Is exactly the same as (infix notation)
[1,2] map (item, index) -> (item * 10 + index)
// Is exactly the same as (infix + injection)
[1,2] map ($ * 10 + $$)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.