Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Data Objects


Sometimes, a fully-defined class is overkill, and all you need is a way to attach some methods to a piece of data (i.e. a Map).

Bound Methods 

When you assign an anonymous function to a Map key, any reference to @ inside the function will automatically be bound to the Map.

This lets you create dynamic objects on the fly, much like JavaScript’s object literals.

$user = {
    name: 'Tadala',
    job: 'Teacher',
    about: fn {
        return ~ ' works as a ' ~ @.job

//= 'Tadala works as a Teacher'