Skip to content

Add support for closures (to Forge) #102

Description

@uliwitness

We want an English-like syntax. Best I could come up with is

take <parameters>|nothing then
  -- commands go here
end take

and

take <parameters>|nothing then -- single command goes here

and

take <parameters>|nothing
then -- single command goes here

This reads fairly well when e.g. used in a function:

put sortedByName(myAddresses, take firstPerson, secondPerson then return firstPerson > secondPerson) into sortedAddresses

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew features (as opposed to bugs in existing features).interpreterHammer programming language: Parser, tokenizer, interpreter.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions