I very strongly support this, I've shown in the recent thread that HKT also allow expressing protocol Monad
with a common flatMap
signature. This can be reused across different types too: Array
, Set
, Optional
, Result
and all widely used future/promise types. Even though monadic DSL is more of a long-term thing, HKT would give us a strong foundation and common vocabulary to work with these patterns. Lack of it leads to duplicated code and confusion. Isn't the lack of HKT the reason for flatMap
on Set
returning an Array
instead of Set
?
2 Likes