Are there non-trivial Foldable or Traversable instances that don't look like containers?

后端 未结 3 1335
迷失自我
迷失自我 2020-12-24 14:36

There are lots of functors that look like containers (lists, sequences, maps, etc.), and many others that don\'t (state transformers, IO, parsers, etc.). I\'ve

3条回答
  •  半阙折子戏
    2020-12-24 15:03

    I don’t think it’s actually Foldable or Traversible, but MonadRandom is an example of something that could be, functioning like an infinite list, but which doesn't look any more like a container than anything else that’s foldable. Conceptually, it’s a random variable.

提交回复
热议问题