Created
October 16, 2017 15:43
-
-
Save Yardanico/2d5c1dd444918ec34a43929cfa2c9a87 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
type | |
Comparable = concept a | |
(a < a) is bool | |
proc ada[T: Comparable](a, b: T): T = | |
if a < b: | |
return b | |
else: | |
return a | |
echo ada(5, 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment