move non essential opcodes to primitives and add userdata

This commit is contained in:
Lobo 2026-01-23 11:00:28 -03:00
parent e654143a90
commit 45e2c0d406
17 changed files with 234 additions and 37 deletions

View file

@ -1,12 +1,12 @@
#load("std.grr")
def fizzbuzz? { [3 % 0 =] [5 % 0 =] bi or }
def fizz { when: 3 % 0 = ["Fizz" type]; }
def buzz { when: 5 % 0 = ["Buzz" type]; }
def fizz { when: 3 % 0 = ["Fizz" print]; }
def buzz { when: 5 % 0 = ["Buzz" print]; }
def fizzbuzz1 {
if: fizzbuzz?
[ [fizz] keep buzz "\n" type ]
[ [fizz] keep buzz nl ]
[ . ];
}