one more question about the semicolon operator:
when there are a number of <- operators, and a return at the end,
then, the right-associativity of bind let me compute the type of the
expresson
x1 <- f y1;
x2 <- g y2;
return xml = bind ( f y1) (fn x1 => bind (g y2) (fn x2 => return xml))
But what can I do when there are more non- <- lines at the end, like
fun write t s =
oldTail <- get t.Tail;
newTail <- source End;
set oldTail (Line (s, newTail));
set t.Tail newTail
does it have the usual imperative typing
e1: t1 e2 : t2
--------------------
(e1;e2) : t2
?
- Gergely
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur