Skip to content

Create a closure function #273

@joente

Description

@joente

Is your feature request related to a problem? Please describe.
It is currently not possible to create a new closure based on input values.

Describe the solution you'd like
Create a closure(..) function which allows for the creation of a new closure by string.
If no argument is given, a default closure ||nil should be returned.

Examples:

without argument

c = closure();  // -> || nil
c();  // -> nil

with a string argument

c = closure('|x| x*2');  // -> |x| x * 2
c(21);  // -> 42

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions