Skip to content

Free variables and binding #1495

@fwaaade

Description

@fwaaade

Issue type:

  • ➕ Feature request

Short description:

Free variables and binding.

A new operator called "Free variable" that takes no parameters (type "Any"). It can be used as the input of other operators. Then there is another operator called "Bind" which takes a free variable and anything (type "Any -> Any -> (Any -> Any)"). This will return an operator that will replace all occurences of the free variable in the second input to the value given.

Currently, to make predictates like Item->Boolean, you have to use Operator and Pipe. But with a free variable, you just use the operators directly with a free variable and bind it to the input at the end. It's also much easier to work with flipped parameters since the free variable can go on any side of an operator.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Options

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions