There is no syntax ...

Eat Your Greens

EYG

Language tour

This section will introduce all the elements of an Eyg program.

Integer

:

integers are whole numbers that can be positive or negative. the funcations available in std.integer include add subtract and many more operations on integers

Integers are created by pressing n (for number).

Strings

:

strings contain text values, including whitespace. the funcations available in std.string include uppercase, append and many more operations.

Strings are created by pressing s (for number).

functions

All functions are anonymous. Functions are first class an can be returned by other functions. There is no support for multi-argument functions, to accept multiple arguments a function must return a function, and is therefore automatically curried

:

Let bindings

A value can be given a name using let. Names can be reused by later let bindings, but the values contained are immutable, meaning the values themselves cannot be changed.

:

Records

Records are used to store multiple values with a name. Typing is structural and so there is no need to define types a head of time. Because typing is structural any record with the fields required by a function can be passed to that function

:

Unions

Unions are tagged unions, they are extensible. Case statements are first class i.e. it is possible to compose them.

:

matches can be open

:

matches can be composed

: