mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-11-30 12:14:17 +03:00
24 lines
386 B
Idris
24 lines
386 B
Idris
infixr 5 ::
|
|
|
|
data List a = Nil | (::) a (List a)
|
|
data Nat = Z | S Nat
|
|
|
|
data Vect : Type -> Type where
|
|
data Set : Type -> Type where
|
|
|
|
namespace Vect
|
|
export
|
|
toList : Vect a -> List a
|
|
export
|
|
fromList : List a -> Vect a
|
|
|
|
namespace Set
|
|
export
|
|
toList : Set a -> List a
|
|
export
|
|
fromList : List a -> Set a
|
|
|
|
keepUnique : List b -> List b
|
|
keepUnique {b} xs = toList (fromList xs)
|
|
|