mirror of
https://github.com/XAMPPRocky/tokei
synced 2024-09-13 21:11:29 +00:00
fc327c34bc
Hiya! Teaching Tokei to spot [Gleam](https://gleam.run/). Thanks :)
35 lines
578 B
Plaintext
35 lines
578 B
Plaintext
//// 34 lines 24 code 4 comments 6 blanks
|
|
|
|
import gleam/option.{Option, None}
|
|
import gleam/io
|
|
|
|
pub type LoadedBool {
|
|
Yup
|
|
AlsoYup
|
|
}
|
|
|
|
pub external type Person
|
|
|
|
pub opaque type Cat {
|
|
Cat(
|
|
name: String,
|
|
age: Int,
|
|
is_cute: LoadedBool,
|
|
owner: Some(Person),
|
|
)
|
|
}
|
|
|
|
pub fn main() {
|
|
let jane = // Here is a quote "
|
|
new_kitten(called: "Jane")
|
|
let kira = new_kitten(called: "Kira")
|
|
io.println("Two kitties!")
|
|
}
|
|
|
|
/// A new baby kitten
|
|
///
|
|
fn new_kitten(called name: String) -> Cat {
|
|
// No owner yet!
|
|
Cat(name: name, age: 0, is_cute: Yup, owner: None)
|
|
}
|