Fork me on GitHub

Try PureScript!

Type PureScript code below and press 'Compile', or select one of the examples below:

Examples

PureScript Code

Generated Javascript

var PS = PS || {};
PS.Prelude = (function () {
    "use strict";
    function $less$dollar$greater(dict) {
        return dict["<$>"];
    };
    return {
        "<$>": $less$dollar$greater
    };
})();
var PS = PS || {};
PS.Main = (function () {
    "use strict";
    var Prelude = PS.Prelude;
    var Control_Monad_Eff = PS.Control_Monad_Eff;
    var Debug_Trace = PS.Debug_Trace;
    function random() {   return Math.random(); };
    var main = Prelude["<$>"](Control_Monad_Eff.functorEff({}))(Debug_Trace.print(Prelude.showNumber({})))(random);
    return {
        main: main, 
        random: random
    };
})();