You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now Fold contains a lot of custom code and syntax to make constructing and combining Fold instances easier. It may make understanding of the whole library harder, because one will have to learn a domain specific language.
The idea is to investigate prior art and reuse as much syntax as possible for Fold. I.e. Fold is actually Kleisli[F, (S, A), S], so monad syntax could be reused from it etc. The key idea could be making a less restrictive type such as IndexedFold[F, (S1, A), S2] and then reuse functionality from Kleisli to define methods for original Fold[F, S, A].
Right now
Fold
contains a lot of custom code and syntax to make constructing and combiningFold
instances easier. It may make understanding of the whole library harder, because one will have to learn a domain specific language.The idea is to investigate prior art and reuse as much syntax as possible for
Fold
. I.e.Fold
is actuallyKleisli[F, (S, A), S]
, so monad syntax could be reused from it etc. The key idea could be making a less restrictive type such asIndexedFold[F, (S1, A), S2]
and then reuse functionality fromKleisli
to define methods for originalFold[F, S, A]
.See also similar structure here:
https://github.com/notxcain/aecor/blob/master/modules/core/src/main/scala/aecor/data/Fold.scala
The text was updated successfully, but these errors were encountered: