Fold

From Esolang
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

  1. >: Move the memory pointer to the left
  2. <: Move the memory pointer to the right
  3. &: 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
  4. *: Creates a seam at the location of the memory pointer
  5. $: Creates a loop in the program tape, ends at @, the loop goes in the direction that the program pointer is moving in
  6. !: Flips the direction of the memory pointer
  7. ?: Skips the next instruction if the value under the memory pointer is not 0
  8. ^: Cuts a loop, allowing the execution of the program to continue normally
  9. @: 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
  10. .: Patches a seam, if existent, at the location of the memory pointer;
  11. :: print the value under the memory pointer
  12. (: undoes a fold if the memory pointer is on the start point of a fold
  13. ;: Get input and put it under the memory pointer
  14. #: Branches the code and the child skips the next instruction
  15. ~: Ends execution

Minimal Examples

$>#&@ this is a infinite incrementer, acting like [0,1..] the Haskell equivalent to it

More info later