Skip to content

Add more complete combinators #192

Description

@pfultz2

Add some more adaptors for more complete combinatory logic:

  • B = compose
  • C = flip
  • K = always
  • W = ???
  • S = ???
  • I = identity

So the S(ie application combinator) and the W(ie duplicate combinator) combinators are missing, which could be something like:

S(f, g)(xs...) == f(xs...)(g(xs...))
W(f)(xs...) == f(xs...)(xs...)

Also, even though the C combinator is like flip, it could also be defined as:

C(f)(xs...)(ys...) == f(ys...)(xs...)

There is also the monad bind that can be defined for functions, something like:

mbind(f, g)(xs...) == g(f(xs...))(xs...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions