forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlazy.js
42 lines (32 loc) · 880 Bytes
/
lazy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'use strict';
var Curry = require("./curry.js");
var CamlinternalLazy = require("./camlinternalLazy.js");
function from_fun(f) {
return {
LAZY_DONE: false,
VAL: (function () {
return Curry._1(f, undefined);
})
};
}
function from_val(v) {
return {
LAZY_DONE: true,
VAL: v
};
}
var Undefined = CamlinternalLazy.Undefined;
var force_val = CamlinternalLazy.force_val;
var is_val = CamlinternalLazy.is_val;
var lazy_from_fun = from_fun;
var lazy_from_val = from_val;
var lazy_is_val = CamlinternalLazy.is_val;
exports.Undefined = Undefined;
exports.force_val = force_val;
exports.from_fun = from_fun;
exports.from_val = from_val;
exports.is_val = is_val;
exports.lazy_from_fun = lazy_from_fun;
exports.lazy_from_val = lazy_from_val;
exports.lazy_is_val = lazy_is_val;
/* No side effect */