Giml is a strict, statically typed, purely functional programming language with emphasis on structural typing developed live on stream. See the project page for more information.
Example Code
-- linked list data type and map operation
main = ffi( "console.log", head (map (add 1) list) )
type List a =
| Nil
| Cons { head : a, tail : List a }
end
list =
Cons { head = 1, tail = Cons { head = 2, tail = Nil } }
head list =
case list of
| Cons { head = head } ->
head
end
map f xs =
case xs of
| Nil -> Nil
| Cons { head = x, tail = rest } ->
Cons { head = f x, tail = map f rest }
end