move non essential opcodes to primitives and add userdata
This commit is contained in:
parent
e654143a90
commit
45e2c0d406
17 changed files with 234 additions and 37 deletions
|
|
@ -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 ]
|
||||
[ . ];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue