An interpreted language written in Go, as described in Write an interpreter in Go (Go言語でつくるインタプリタ)
$ git clone https://github.com/nao23/monkey
$ cd monkey
$ go run main.go
Hello nao23! This is the Monkey programming language!
Feel free to type in command
>> "HELLO"
HELLO
>> 1
1
>> -1
-1
>> true
true
>> false
false
>> "HELLO"
HELLO
>> "HELLO" + " WORLD"
HELLO WORLD
>> [1, 2, 3]
[1, 2, 3]
>> [1, 2, 3][2]
3
>> [1, "a", true][2]
true
>> {"a": 1, "b": 2, "c": 3}["b"]
2
>> {1: "x", "b": 2, true: 3}[true]
3
>> 1 + 2
3
>> -1 + 5
4
>> 3 - 1
2
>> 2 * (3 + 4)
14
>> 2 * (3 + 4) + 8 / 4
16
>> 1 < 2
true
>> 1 > 2
false
>> 1 == 1
true
>> 1 != 1
false
>> !(true)
false
>> let a = 1
>> a
1
>> let b = 2
>> a + b
3
>> if (1 < 5) { 1 }
1
>> if (1 > 5) { 1 } else { 2 }
2
>> let add = fn(a, b) { a + b };
>> add(1, 2)
3
>> let sub = fn(a, b) { a - b };
>> sub(3, 1)
2
high order function:
>> let applyFunc = fn(a, b, func) { func(a, b) }
>> applyFunc(2, 2, add)
4
>> applyFunc(10, 2, sub)
8
closures:
>> let newAdder = fn(x) { fn(y) { x + y } }
>> let addTwo = newAdder(2)
>> addTwo(3)
5
>> len("ABC")
3
>> len([1, 2, 3])
3
>> first([1, 2, 3])
1
>> last([1, 2, 3])
3
>> rest([1, 2, 3])
[2, 3]
>> push([1, 2], 3)
[1, 2, 3]
>> puts("HELLO")
HELLO
null