lasagnascript
v0.0.1
Published
Coming Soon ===========
Downloads
1
Readme
Coming Soon
Sneak peek::
import Rx = "rx";
def even(x: Number): Boolean =
rem(x, 2) = 0;
def sqrt(x: Number)(require !isNaN(x) -> x >= 0): Number =
Math.sqrt(x);
def main(input) =
input
|> filter(even)
|> map(sqrt)
|> forEach(x => console.log(x));
main(range() |> take(10));
let field = document.getElementById('number-field');
main(Rx.Observable.fromEvent(field, 'input')
|> map(e => e.target.value)
|> map(x => parseInt(x)));