To use this website fully, you first need to accept the use of cookies. By agreeing to the use of cookies you consent to the use of functional cookies. For more information read this page.

Official ZPE/YASS documentationReference functions

Chainable functions or object functions are functions that can be run on an element or value. For example, a lot of languages expose a toString() or similar function on elements or values. ZPE also adds this too, and it's easy to do:

$a = 43
$b = [43, 49]

This example is pretty poor, since the print function already transforms it's input to a string. However, the second example will correctly select an element from the list.

The decision to use reference pointer (the dot .) instead of the arrow (->) was based on the confluence of different language concepts and to keep everything object-oriented syntactically similar - lists and associative arrays are not objects but they have underlying functions so the dot suits them whereas the arrow suits objects.

Reference functions only work on a few data types presently:

  • List
  • Map

There is more information under each data type.


There are no comments on this page.

New comment
Provide feedback on this page
Comments are sent via email to me.