On Oct 5, 2009, at 19.05 h, Sripriya G wrote:
---------------- import structure Channel from "x-alice:/lib/data/Channel" fun forall nil f = () | forall (x::xs) f = (f x; forall xs f); val c = Channel.channel() val s = Channel.toList (c) ---------- Upon invoking the "forall" function with the (lazy) list 's', 's' becomes a future.
Well, that's the semantics of lazy futures: once you force them (which happens trough the pattern match in the forall function) they turn into regular futures. That means, a thread is started to compute their value. But since the channel is empty in your example, that thread blocks.
- Andreas
_______________________________________________ alice-users mailing list [email protected] http://www.ps.uni-sb.de/mailman/listinfo/alice-users
