type Helpers { func repeat 0 _ = unit func repeat n x = x : repeat (n - 1) x func twice x = repeat 2 x func thrice x = repeat 3 x proc printEach!(iterable) { for item in iterable { println!(item) } } export twice, thrice, printEach } proc main!() { let numbers = [1, 2, 3, 4, 5] Helpers::printEach!(map Helpers::twice numbers) Helpers::printEach!(map helpers::thrice numbers) }