Integrated Dynamics

Integrated Dynamics

88M Downloads

Free variables and binding

fwaaade opened this issue · 1 comments

commented

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.

commented

Thanks for the suggestion!