A lisp-like compile-to JS language.
[ 1 2 3 4 5 ]
Create a new blank object
make obj
set obj key value
get obj key
// i am a comment
/*
i am a comment
*/
$ a 1
(add one two)
// add(one, two)
def myFn [ one two ] {
(add one two)
}
$ arr [ 1 2 3 4 ]
@arr {
(console.log item)
}
@[ 1 2 3 ] {
(console.log item)
}
? expression {
} else {
}
$ a 'hello'
? a is 'hello' {
(console.log 'hello world!')
} else {
(console.log 'not hello world :(')
}
? err exists {
! err
}
$ str 'hello world'
$ strCheck 'o w'
? str contains strCheck {
(console.log str 'contains' strCheck)
} else {
(console.log str 'doesnt contain' strCheck)
}
(someFn def cb [ err result ] {
? err kinda true {
(console.log 'omg an error!!')
! err
}
(console.log result)
})
! 5 // return 5
def return5ifStringContains5Else0 [ str ] {
? str contains 5 {
! 5
} else {
! 0
}
}
use 'fs' as fs
export fs
$ five (add 3 2)
$ two (sub 1000 998)
$ sixhundred (mul 100 6)
$ two (div 10 5)
$ three (mod 3 100)