Idris2-boot/samples/MyOrd.idr
Edwin Brady 827c51e343 More documentation updates
Some way through the interfaces docs, but "using" for named parent
interfaces is not implemented yet.
2020-02-25 21:01:15 +00:00

11 lines
210 B
Idris

import Data.List
[myord] Ord Nat where
compare Z (S n) = GT
compare (S n) Z = LT
compare Z Z = EQ
compare (S x) (S y) = compare @{myord} x y
testList : List Nat
testList = [3,4,1]