Apelang operates on pure, unadulterated primate instinct. It's simple, it's raw, and it's surprisingly effective. Here are the tools at your disposal.
Note: This playground is a simplified simulation. It supports most of the core syntax but does not include advanced features like summon, forage, inscribe, or tumble/catch blocks.
Core Concepts
- Variables & Types: Declare with
ape. Basic types includenumber,string,boolean(true,false), andnil. - Comments: Use
#to leave notes for other apes. - I/O: Print to the console with
treeand get user input withask(). - Thematic Operators: Perform arithmetic with
ooh(+),aah(-),eek(*), andook(/). - Functions (Tribes): Group code into reusable blocks with
tribe. Usegiveto return a value.
Data Structures
- Bunch (Arrays): Create an ordered list of items:
ape myBunch = [1, "two", true]. - Canopy (Maps): Create a key-value store:
ape myCanopy = {"food": "banana"}.
Control Flow & Logic
- Conditionals: Use
if/elseblocks. Combine conditions with logical operatorsripe(AND) andyellow(OR). - Loops: Use
swingfor a set number of repetitions andbananafor while-style loops.