Skip to content

Instantly share code, notes, and snippets.

@lpil
Last active July 24, 2020 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpil/d355b3eadea151ece8a27d10b12bcb34 to your computer and use it in GitHub Desktop.
Save lpil/d355b3eadea151ece8a27d10b12bcb34 to your computer and use it in GitHub Desktop.
pub fn make_birthday(x: aged, get_age: fn(aged) -> Int) {
get_age(x) + 1
}
pub type Person {
Person(age: Int)
}
pub fn make_birthday(person: Person) {
person.age + 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment