Skip to content

Instantly share code, notes, and snippets.

@menduz
Created October 20, 2017 16:10
Show Gist options
  • Save menduz/785b6f0692baa69fa8fe8900040c06a8 to your computer and use it in GitHub Desktop.
Save menduz/785b6f0692baa69fa8fe8900040c06a8 to your computer and use it in GitHub Desktop.
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