mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-28 09:09:31 +00:00
Add anonymous functions
This commit is contained in:
parent
2c6d66c222
commit
5e441886c0
15 changed files with 352 additions and 110 deletions
|
|
@ -945,7 +945,7 @@ From lowest to highest priority:
|
|||
```
|
||||
_;_ _;
|
||||
_:=_ _+=_ _-=_ _//=_ _/=_ _*=_ _%=_ _^=_
|
||||
_,_
|
||||
_,_ $_
|
||||
_~?_ _~_ _#_
|
||||
_=_
|
||||
_|_ _&_
|
||||
|
|
@ -1030,6 +1030,10 @@ This only works on strings:
|
|||
|
||||
`a!fn(args)`: call the function or function reference with the variable as first argument. Parantheses are optional.
|
||||
|
||||
`$x`: returns a reference to an anonymous function that returns the expression `x`. Note that the returned reference *can not* be persisted.
|
||||
|
||||
`$(parameters)x`: returns a reference to an anonymous function that returns the expression `x` and takes some parameters (same syntax as function definition lines). Note that the returned reference *can not* be persisted.
|
||||
|
||||
##### Variable references
|
||||
|
||||
`&var`: returns a variable reference to the given variable. If it is already a reference, returns the same reference.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue