T H Lim wrote:There are many Scala collections like List, Set, Priority Queue, etc. They are in immutable and mutable forms and they are "functional". However, they do not support the effect F[_] out of the box. Fortunately, Cats Effect provide some of the commonly used collection like queue, dequeue, etc. For the developers, what are the options they have to get an effect-ful collection like Map and List, without writing overly complicated collections that support the effect F[_]? How do other pure FP languages developers manage in general?
Hi, thank you for your question!
I'm afraid, I'm unable to answer it any expertly. I was never involved into work on collections and didn't have any chance to learn Scala.
What I see is our terminology differs a bit. In Haskell, we don't call F[_] an effect, it's a type parameter of some data structure, for example:
We can make it to be a Functor, and even a Monad if we wish. Not sure if this fits into the "simple enough" characteristics though.