function pointer - pannous/warp GitHub Wiki

Functions in Angle are charged, like in ruby/crystal:
:warning: Functions are invoked without parentheses!

time := now
time # prints 2020-11-11|11:00.12 or similar
time # prints 2020-11-11|11:00.13 or similar

In blocks (function body declarations), the evaluation is delayed, as seen above

Unlike ruby function pointers are first class citizens in Angle: The symbol :now is different from the function pointer &now.

If one prefers verbal syntax to sigils, function pointers can be used with function or func keyword:
map function square on [1 2 3] == [1 4 9]

:warning: Explicit function pointers are only necessary when the symbol could be mistaken for a function call otherwise:

map square on [1 2 3] == [1 4 9] would work just as fine because 1.) map has signature map of block and object ...2.) square is followed by keyword 'on' which can not be an argument to square (unless there was a signature square on list = ...` even then the ambiguity might be resolved)