“Objects” in f-flat

node v8.17.0
version: 3.0.0
endpointsharetweet
const { Stack } = require('@hypercubed/f-flat@0.0.6'); const f = new Stack(); f.eval(` animal: { name: 'unknown', speak: [ 'grunt' ] } ; dog: animal { speak: [ 'bow-wow' ] } << ; human: animal { speak: [ name: @ 'My name is ' swap + ] } << ; `).stack;
f.eval(` dog { name: 'rover' } << `).stack[0];
f.eval(` speak: @ eval `).stack[0];
f.eval(` drop human { name: 'steve' } << dup speak: @ eval `).stack[0];
Loading…

no comments

    sign in to comment