*
This commit is contained in:
parent
e18681b309
commit
20da6dd16d
14 changed files with 279 additions and 183 deletions
|
|
@ -1,4 +0,0 @@
|
|||
#load("std.grr")
|
||||
|
||||
while: [stdin fgetline]
|
||||
[print];
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#load("std.grr")
|
||||
load "../std.grr"
|
||||
|
||||
def fib {
|
||||
0 1 dig [dup [+] dip swap] times drop
|
||||
|
|
|
|||
|
|
@ -1,13 +1,4 @@
|
|||
def print { file/stdout file/write }
|
||||
def when { [] if }
|
||||
def keep { over [call] dip }
|
||||
def bi { [keep] dip call }
|
||||
|
||||
def times {
|
||||
if: over 0 =
|
||||
[drop drop]
|
||||
[swap over >r >r call r> 1 - r> times];
|
||||
}
|
||||
load "../std.grr"
|
||||
|
||||
def fizzbuzz? { [3 % 0 =] [5 % 0 =] bi or }
|
||||
def fizz { when: 3 % 0 = ["Fizz" print]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue