Idris2/samples/MyOrd.idr
Edwin Brady 4f10bfcfd2 Copy samples directory from Idris2-boot
This is referred to in the documentation, so should be there
2020-06-30 10:51:09 +01: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]