Share, pass, tricks

Pass one toy, share toys, share stash, function definitions and calls.

Pass (exactly one toy to one friend)

Pass words: pass, passes, passed, toss, tosses, tossed + to.

LineParses asNeed to know
she passes a toy to the beaglePass[giver, beagle]Moves 1 toy

Share toys

Share words: share, shares, shared, split, splits + with.

LineParses asNeed to know
the labrador shares with the beagle and huskyShare toysInteger split; remainder stays with giver
Bimba shares with the dachshundSharePet names work
the labrador shares with the golden retrieverShareMulti-word breeds

Recipients: comma-separated (beagle, husky) or and-joined (beagle and husky).

Integer division rules: Runtime semantics.

Share stash contents

LineParses asNeed to know
the labrador shares her cookie jar with the beagle, huskyShare stashItems become treats, split round-robin; stash cleared

Tricks (functions)

Define: expects / expectreturns / returnbury (or end, etc.).

LineParses asNeed to know
add expects a b returns a plus b buryFunctionDef one-liner
add expects a b returns a plus b + body + buryFunctionDef + stepsMultiline body
greet expects name returns nothing + bark name + endreturns nullnothing return type
bark add with 2, 3Print + FunctionCallCall with with

Parameters are single words between expects and returns. Return expression can be any value expression.

Recursion

Multiline trick bodies work. Return value comes from the returns expression or the last value in the body before bury:

add expects a b returns a plus b bury

double expects x returns add with x, x bury

Bark has branches, loops, stashes, piles, math, and shared state. That is the usual esolang checklist. counter-tradition.woof in the repo is the Brainfuck-style inside joke. No formal proof at 2 a.m.

Expression grammar for trick args and returns: Expressions.