#language #fib #rgb #10

app som

The 'som' programming language

41 breaking releases

new 0.43.0 May 24, 2025
0.41.0 May 23, 2025
0.23.0 Mar 4, 2025
0.9.3 Jun 13, 2024

#83 in Procedural macros

Download history 26/week @ 2025-02-15 1157/week @ 2025-02-22 763/week @ 2025-03-01 66/week @ 2025-03-08 500/week @ 2025-04-12 93/week @ 2025-04-19 26/week @ 2025-05-10 828/week @ 2025-05-17

854 downloads per month

MIT license

82KB
2K SLoC

som

An idiot admires complexity, a genius admires simplicity.

let fib = fn(n ~ int){
    n if n < 2 else fib(n - 1) + fib(n - 2)
}

fib(10)
type Option<T> = Some(T) | None

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

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

let print_color = fn(color ~ Color) print(color)

Dependencies

~14–23MB
~351K SLoC

OSZAR »