Created
July 23, 2020 10:42
-
-
Save endeveit/3494cd8bf093bc7a2d026fd9a0cc4baf to your computer and use it in GitHub Desktop.
This file contains 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
module main | |
type Number = any_int | any_float | |
fn is_gt(val string, dst Number) bool { | |
match dst { | |
any_int { | |
return val.int() > dst | |
} | |
any_float { | |
return val.f64() > dst | |
} | |
} | |
} | |
fn main() { | |
rs := is_gt('3', 2) | |
println(rs) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here's the output: