brainappend

From Esolang
Jump to navigation Jump to search

brainappend is a brainfuck derivative by User:Joaozin003, partly inspired by Vague where the braces ([ and ]) append their contents to the source code (including themselves). This makes looping much more difficult.

Instructions

Instruction Command
+, -, <, >, , and . Same as brainfuck
] If the value of the current memory cell is not 0, then append the source code enclosed by this and the matching [, including the braces themselves, e.g. [>] appends [>] when ] gets ran
[ If the value of the current memory cell is 0, then jump to the matching ].

Examples

Cat program (NUL-terminated)

,[.,]

Gets a character, then appends [.,] to the source code if it is not NUL.

See also