|
@@ -8,7 +8,7 @@ this is an implementation of the jk interpreter in C. Requires libgc (a.k.a. bdw
|
|
|
fac:*/!. / analytic
|
|
|
fac 5
|
|
|
120
|
|
|
- facr:<.;1?.(]*(f.<)),:(:1) / recursive
|
|
|
+ facr:<.;1?.(]*(s.<)),:(:1) / recursive
|
|
|
facr 5
|
|
|
120
|
|
|
/ or simply use *.
|
|
@@ -23,7 +23,7 @@ this is an implementation of the jk interpreter in C. Requires libgc (a.k.a. bdw
|
|
|
55
|
|
|
fib"!.10
|
|
|
1 1 2 3 5 8 13 21 34 55
|
|
|
- fibr:<.;1?.((f.<)+(f.(<<))),:] / recursive
|
|
|
+ fibr:<.;1?.((s.<)+(s.(<<))),:] / recursive
|
|
|
fibr"!.10
|
|
|
1 1 2 3 5 8 13 21 34 55
|
|
|
/ or just +.
|
|
@@ -262,8 +262,8 @@ $: dyadic implode join y inserting x between
|
|
|
|
|
|
p. monadic print print x
|
|
|
P. monadic println print x and a \n
|
|
|
-f. monadic selfref1 monadic reference to current function or rhs of bind
|
|
|
-f. dyadic selfref2 dyadic reference to current function or rhs of bind
|
|
|
+s. monadic selfref1 monadic reference to current function or rhs of bind
|
|
|
+s. dyadic selfref2 dyadic reference to current function or rhs of bind
|
|
|
F. monadic read read file (x=0 to read stdin)
|
|
|
F. dyadic write write file (y=0 to write to stderr)
|
|
|
t. monadic type type of x, array=0, verb=1, symbol=2, number=3, char=4, nil=5, udf=6
|