Let's break down the examples provided in the examples/ folder to see how everything ties together.
The classic starting point.
- Concepts:
eh listen lah,oi, variable declaration.
A standard programming challenge.
- Concepts: Loops (
one by one lah), Conditionals (confirm or not), Modulo operator (%).
Calculating the Fibonacci sequence.
- Concepts: Functions (
steady lah do this), recursion, and math.
Exploring complex data types.
- Concepts:
whole list(arrays) andall the things(objects).
Closures and higher-order functions.
- Concepts: Returning functions from functions, complex scope.
What happens when you "talk cock".
- Concepts: Error reporting,
TokKokError.
The spicy side of Lahlang.
- Concepts:
puki panic,kan ni na crash, and other 🌶️ keywords.
Aggressive error handling and assertions.
- Concepts:
chao cb assert,si behintensifiers.
From the root of the project, you can run any example:
lahlang examples/1.\ hello.lahYou've reached the end of the documentation! You're now ready to build amazing things with Lahlang. Can one lah! 🇸🇬