Fold
Jump to navigation
Jump to search
- This is still a work in progress. It may be changed in the future.
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
Fold is a unimplemented language devised by user:moon.
Instruction set
- >: Move the memory pointer to the left
- <: Move the memory pointer to the right
- &: Start a fold in the direction of the instruction pointer, will end at contacting a seam, anything under the fold is incremented, a fold moves along at one cell per tick
- *: Creates a seam at the location of the memory pointer
- $: Creates a loop in the program tape, ends at @, the loop goes in the direction that the program pointer is moving in
- !: Flips the direction of the memory pointer
- ?: Skips the next instruction if the value under the memory pointer is not 0
- ^: Cuts a loop, allowing the execution of the program to continue normally
- @: Marker for $, doesnt do anything unless linked to a loop, in which it moves the program pointer back to the loop it is linked to
- .: Patches a seam, if existent, at the location of the memory pointer;
- :: print the value under the memory pointer
- (: undoes a fold if the memory pointer is on the start point of a fold
- ;: Get input and put it under the memory pointer
- #: Branches the code and the child skips the next instruction
- ~: Ends execution
Minimal Examples
$>#&@ this is a infinite incrementer, acting like [0,1..] the Haskell equivalent to it
More info later