What are the differences between mapcat in Clojure and flatMap in Scala in terms of what they operate on?

后端 未结 4 1186
隐瞒了意图╮
隐瞒了意图╮ 2021-02-08 14:13

I understand the equivalent to flatMap in Scala is mapcat in Clojure.

I have an inkling that mapcat in clojure only works with sequences, unli

4条回答
  •  孤独总比滥情好
    2021-02-08 14:56

    In the standard Scala library: Responder, Future, Parser, ControlContext. None of them are sequences or particularly sequence-like. There is also a slight variation in ParseResult.

提交回复
热议问题