EGGlang Documentation

Learn about EGGlang syntax, built-in functions, and programming paradigms.

Getting Started

EGGlang is a simple programming language designed for learning and experimentation. Here's how to get started:


do(
    define(x, 10),
    define(y, 20),
    define(sum, +(x, y)),
    print(sum)
)
      

Built-in Functions

  • print(value): Prints the value to the output.
  • +(a, b): Adds two numbers.
  • -(a, b): Subtracts two numbers.
  • *(a, b): Multiplies two numbers.
  • /(a, b): Divides two numbers.

Control Structures

EGGlang supports the following control structures:

  • if(condition, then, else): Executes then if the condition is true, otherwise executes else.
  • while(condition, body): Repeats the body while the condition is true.
  • do(...): Executes multiple expressions in sequence.