We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

GolfBall

From Esolang
Jump to navigation Jump to search

GolfBall is a golfing language inspired by Binary lambda calculus. Due to the language's nature, if an ambiguous instruction is given, a greedy algorithm is employed. It was designed to be more usable than BLC, but still very compact.

Operations and Syntax

0x - Define function x. 0 - Pop. x0 - Push number. 1x - Call function x. 01 - Take an input and push it. 10 - Increment top of the stack. 101 - Decrement top of the stack. 100x - Compare top of the stack to the input and jump the bottom of the stack bits and pop it if above. 010x - Compare top of the stack to the input and jump the bottom of the stack bits and pop it if below.

Examples

Golfie-Complete (Be able to push 2, increment a number, and pop it.):

010110100

Recursion:

01010