All pastes #115926 Raw Edit

Untitled

public text v1 · immutable
·published 2006-08-04 23:09 UTC
rendered paste body
This is Brainfuck . . With *functions*.
char array[300000];
pointer *p=array;
bignum function;
+ does ++*p;
- does --*p;
> does ++p;
< does --p;
[ does while (*p) {
] does }
. does putchar *p;
, does *p = getchar;
= does ++function;
_ does --function;
v does downf(function); \\ Where downf() and upf() will call -function and function, respectively
^ does upf(function);

To specify a function in the input, one does:
1:Brainfuck code here.
-1:Different code here.

So, one could theoretically *finally* write yourself a recursive implementation of the Towers of Hanoi. ;)