|
|
|
|
|
by gwu78
3338 days ago
|
|
First time I learned about SETL at NYU was when I was learning about Spitbol. Here is a fizzbuzz in Spitbol. Probably not the best way to do it. var a = 0;
start
+a = a + 1;
break
+lt(a,101) :f(end);
x01
+x = (remdr(a,3) + remdr(a,5)); eq(x,0) :s(x06);
x02
+y = remdr(a,3); eq(y,0) :s(x04);
x03
+z = remdr(a,5); eq(z,0) :s(x05)f(x07);
x04
+output = 'fizz' :(start);
x05
+output = 'buzz' :(start);
x06
+output = 'fizzbuzz' :(start);
x07
+output = a :(start);
end
More: http://www.hakank.org/setl/fizzbuzz.setlHe also has pages on APL and k. |
|