
10 Apr
2003
10 Apr
'03
3:52 p.m.
Mark Carroll writes:
[a definition of unfold in terms of monadic unfold in the identity monad]
Is this a good design idea? Are there better ones? Is myUnfoldr necessarily less efficient than a "normal" unfoldr that doesn't have monads underneath constraining evaluation order?
Actually, though the operations of most monads constrain evaluation order, an interesting property of the identity monad is that it should not do so. This observation has led me to think long and hard about the distinction between monadic and non-monadic computations in Haskell (admittedly to no real conclusion). -Jan-Willem Maessen jmaessen@alum.mit.edu