Skip to content

Minimize custom code in Fold #81

@rtar

Description

@rtar

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].

See also similar structure here:
https://github.com/notxcain/aecor/blob/master/modules/core/src/main/scala/aecor/data/Fold.scala

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions