monkey-go

command module
v0.0.0-...-a6268fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 4 Imported by: 0

README

Monkey programming language

from Writing an interpreter in Go book

let five = 5;

let ten = 10;

let add = fn (x, y) {
  x + y;
}

let result = add(five, tne);

Macros

>> let unless = macro(condition, consequence, alternative) { quote(if (!(unquote(condition))) { unquote(consequence); } else { unquote(alternative); }); };
>> unless(10 > 5, puts("not greater"), puts("greater"));
greater
null

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL