lil-carrot ( ˆ )
Semantically LISP, syntactically JavaScript.
ES6 allows the circumflex ˆ (the little carrot) and ordinal symbols ª and º to be used as variables.
I've found ˆ and ª read and write well as call and apply, but you can use whatever you like.
You can type ˆ and ª on a mac with [alt-i] and [alt-9], respectively.
Installation
$ npm install little-carrot
Examples
var lc = ˆ = lccall ª = lcapply a + b // 15 35
And to show lil-carrot in a non trivial task, here's one way to go about the first problem on projecteuler.
var ˆ = call log = consolelog f = range = frange reduce = freduce filter = ffilter a % b a || b a === b a + b
You might iterate like this:
var lc = ˆ = lccall ª = lcapply a + b { return ? : data} var 1 // hello// hello// hello// hello// hello // 1024
Its just Lisp :)
License
MIT