Skip to main content
Rollback to Revision 2
Source Link
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697

Brain-Flak (BrainHack), 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Brain-Flak (BrainHack), 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Brain-Flak, 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

added 24 characters in body
Source Link
Mr. Xcoder
  • 42.9k
  • 9
  • 87
  • 221

Brain-Flak (BrainHack), 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Brain-Flak, 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Brain-Flak (BrainHack), 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

added 354 characters in body
Source Link
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697

Brain-Flak, 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Brain-Flak, 6 bytes

({}()) 

Try it online!

Brain-Flak, 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Source Link
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697
Loading