Last active
July 24, 2020 20:48
-
-
Save lpil/d355b3eadea151ece8a27d10b12bcb34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn make_birthday(x: aged, get_age: fn(aged) -> Int) { | |
get_age(x) + 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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