From 9066ea884129957fe899d6d10cba1e17547214b9 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Wed, 13 Nov 2013 13:07:23 -0500 Subject: remove nbc: --- src/nbc/promise.sml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/nbc/promise.sml (limited to 'src/nbc/promise.sml') 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 -- cgit v1.2.3