@@ -31,10 +31,22 @@ var Prelude = function() {
3131 fst : function(p) { return p[1]; },
3232 snd : function(p) { return p[2]; },
3333 rem : function(x) { return function(y) { return x % y; }; },
34− div : function(x) { return function(y) { return x / y; }; },
34+ div : function(x) { return function(y) { return ~~(x / y); }; },
35+ compare : function(x) { return function (y) {
36+ x = (typeof x === "object") ? toText(x) : x;
37+ y = (typeof y === "object") ? toText(y) : y;
38+ return [ x === y ? 'EQ' : (x < y ? 'LT' : 'GT') ];
39+ };
40+ },
41+ toFloat : function(x) { return x; },
42+ round : function(n) { return Math.round(n); },
43+ floor : function(n) { return Math.floor(n); },
44+ ceiling : function(n) { return Math.ceil(n); },
45+ truncate : function(n) { return ~~n; },
3546 sqrt : Math.sqrt,
3647 abs : Math.abs,
3748 pi : Math.PI,
49+ e : Math.E,
3850 sin : Math.sin,
3951 cos : Math.cos,
4052 tan : Math.tan,