mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-24 04:43:25 +03:00
827c51e343
Some way through the interfaces docs, but "using" for named parent interfaces is not implemented yet.
11 lines
210 B
Idris
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]
|