diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2013-11-13 13:07:23 -0500 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2013-11-13 13:07:23 -0500 |
commit | 9066ea884129957fe899d6d10cba1e17547214b9 (patch) | |
tree | aaa3ba9e0e507d9d13d8258def7585675e86f221 /src/nbc/promise.sml | |
parent | ba07cda9cbf54d33b657d9ee30bc03c0b67f0b5f (diff) |
remove nbc:
Diffstat (limited to 'src/nbc/promise.sml')
-rw-r--r-- | src/nbc/promise.sml | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/nbc/promise.sml b/src/nbc/promise.sml deleted file mode 100644 index 6bb2655..0000000 --- a/src/nbc/promise.sml +++ /dev/null @@ -1,24 +0,0 @@ -structure Promise -:> sig - type 'fulfillment promise - val delay: (unit -> 'fulfillment) -> 'fulfillment promise - val force: 'fulfillment promise -> 'fulfillment -end = struct - local - datatype 'expectation lazy = - Delayed of unit -> 'expectation - | Forced of 'expectation - in - type 'expectation promise = 'expectation lazy ref - fun delay fulfill = ref (Delayed fulfill) - fun force promise = case !promise of - Delayed fulfill => - let - val expectation = fulfill () - in - promise := Forced expectation - ; expectation - end - | Forced expectation => expectation - end -end |