What other ways can state be handled in a pure functional language besides with Monads?

前端 未结 7 1953
一个人的身影
一个人的身影 2020-12-23 01:58

So I started to wrap my head around Monads (used in Haskell). I\'m curious what other ways IO or state can be handled in a pure functional language (both in theory or realit

7条回答
  •  忘掉有多难
    2020-12-23 02:28

    There is an approach called Functional Reactive Programming that represents time-varying values and/or event streams as a first-class abstraction. A recent example that comes to my mind is Elm (it is written in Haskell and has a syntax similar to Haskell).

提交回复
热议问题