4 ms·
As far as I can see this is just pure functional programming. The IO type in haskell is defined, newtype IO a = IO (State# RealWorld -> (# State# RealWorl
by mjburgess 4y ago
As far as I can see this is just pure functional programming.
The IO type in haskell is defined,
newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #))
- dustingetz 4y agoi think the cycle needs to be looped, see MonadFix and ArrowLoop, also recursive do extension. which is all connected with FRP
- marcosdumay 4y agoIt's not, because the article is feeding several commands into the same RealWord value, before changing into the next, and feeding a lot of commands again.
- pron 4y agoWhile you could describe just about anything with a monadic type (or, indeed, any "Turing-complete" programming language in any other), this isn't functional programming because the central idea of functional programming is that the meaning (denotation) of every term (expression) is a value which is an object of the program, while this is neither the case nor the point for the synchronous paradigm.
- aappleby 4y agoAuthor here. It's not "pure" functional progamming in that state exists and is mutable-in-place, but only via atomic swap - you can interpret the sequence of states as a sequence of monads, but the evaluation semantics are different.