Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 434 Bytes

readme.md

File metadata and controls

29 lines (22 loc) · 434 Bytes

som

An idiot admires complexity, a genius admires simplicity.

fn main() {
    fib(10)
}

fn fib(n ~ int) -> int {
    n if n < 2 else fib(n - 1) + fib(n - 2)
}
type Option<T> = Some(T)
               | None

type Color = Red 
           | Green 
           | Blue 
           | Hex(string) 
           | Rgb(Rgb)

type Rgb = { r ~ int, g ~ int, b ~ int }

fn print_color(color ~ Color)
    print(color)