Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,18 @@
import gleam/int
import gleam/io
pub fn conditional_example(x: Int) {
// if's below are called "pattern guards".
case x {
x if x < 0 -> io.println(x |> int.to_string <> " is negative")
x if x == 0 -> io.println(x |> int.to_string <> " is zero")
_ -> io.println(x |> int.to_string <> " is positive")
}
}
pub fn main() {
// Pattern matching is the only conditional structure in Gleam.
conditional_example(-10)
conditional_example(0)
conditional_example(10)
}