[Ur] stateful structure?
Marc Weber
marco-oweber at gmx.de
Thu Nov 3 05:46:28 EDT 2011
> Is it possible to write a monad in ur?
Of course it is. Search the mailinglist. There has been some discussion
about it because there are some "sealed" monads meaning you can't
reuse the definition - but you could duplicate them.
> hash in ur?
ur has more powerful features: type checked dictionaries.
If you want to find out whether ur provides hash like structures
I'd grep for "option" because there must be a function returning either
a value of a key or nothing.
If it does not exist it can be implemented easily using data types.
Eg have a look at Haskell's source and the "Map" type:
http://haskell.org/hoogle/?hoogle=Map
You can click on the "Source" links.
I don't know exactly whether ur ships with such an implementation. Would
be trivial to write though.
Marc Weber
More information about the Ur
mailing list