@bbcmicrobot 10@%=0
15DEPTH=6
20DIMI(DEPTH)
30K=0
40FORI(K)=0TO1
50K=K+1
60IFK<=DEPTH G.40
70FORL=0TODEPTH
80PRINTI(L);
90N.
100P.
110K=K-1
120N.
130K=K-1
140G.120
-
-
I hadn't thought of it that way. A NEXT behaves a bit like Prolog's "fail".
-
Functional logic can be so much simpler than Prolog! Just augment a functional language with failure (instead of Boolean False producing functions), unification (it’s the same as equality comparison), choice, if/for to cut and collect delimited choices.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.