Mary

Closures are the language's most advanced feature — \<args> -> <block> — and the example below passes one straight to map. The .. operator is not built in either: it lives in the standard library, written in Mary itself, and expands into a list of ints.

map.mary
import list

function main() -> void {
    print(map(\x -> x * 2, 1..10));
}
output
./glados map.mary[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]

Epitech's GLaDOS project: a complete language pipeline in Haskell — tokenizer, parser, two optimization passes, bytecode compiler and a stack-based virtual machine.

Under the hood

HaskellBytecode VMCompiler designStatic typingClosures