[][src]Macro brain_flak_macro::brain_flak

macro_rules! brain_flak {
    ($left:expr, $right:expr $(,)? => $($code:tt)*) => { ... };
    ($input:expr $(,)? => $($code:tt)*) => { ... };
}

Stack manipulation with Brain-Flak.

Brain-Flak reference table

NiladReturn valueAction
()+1None
[]Height of active stackNone
{}Value of top of active stackPops the top value off the active stack
<>0Switches the active stack
MonadReturn valueAction
(...)Inside valuePushes the inside value to the top of the active stack
[...]Negative inside valueNone
{...}Sum of the inside values across all executionsExecutes the inside while the top of the inside stack is not 0
<...>0None

The table above is shamelessly copied from https://github.com/DJMcMayhem/Brain-Flak/wiki/Reference. More information about Brain-Flak can be found on Esolang wiki page, as well as on its GitHub repository

Refer to the crate document for more information about the macro.