Hi there,
is it possible to have a stateful structure in Ur, using the transaction monad?
i.e.
structure Stateful =
struct
val init : {} -> transaction {}
val increment : {} -> transaction xbody
end
so that init stores a source int, e.g. source 0, and then increment
gives back an ever increasing integer through the monad on every call.
The key point would be that there is no mention of type int and the
source int in the type of increment.
I wonder if this is possible in the purely functional Ur.
- Gergely
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur