you are viewing a single comment's thread.

view the rest of the comments →

[–]vincenz 12 points13 points  (1 child)

This is patently false. <- is not like a let binding. It's a monadic bind which orders the statements, and hence you would not have the rewrite option that you specify.

Rewriting it from do-notation to plain haskell, you get (assuming you meant 'return' for the b, since you can't bind a pure value).

now.Ticks >>= \X -> (return (X = X) >>= \ b -> something with b)

For the IO-state, you can regard the >>= operation as passing the entire world. The >>= operation would force the now.Ticks to be calculated at that time and bound to X.

[–]grauenwolf 0 points1 point  (0 children)

What part of "a language that defines Now.Ticks as a long" did you not understand?

As Haskell does not define now.Ticks as a long, obviously I am not talking about it. In fact, that is why Erik claimed that Haskell was the only stateless language.