2020-05-19 20:25:18 +03:00
|
|
|
infixr 5 ::
|
|
|
|
|
2020-05-30 19:03:15 +03:00
|
|
|
export
|
2020-05-19 20:25:18 +03:00
|
|
|
data List a = Nil | (::) a (List a)
|
2020-05-30 19:03:15 +03:00
|
|
|
export
|
2020-05-19 20:25:18 +03:00
|
|
|
data Nat = Z | S Nat
|
|
|
|
|
2020-05-30 19:03:15 +03:00
|
|
|
export
|
2020-05-19 20:25:18 +03:00
|
|
|
data Vect : Type -> Type where
|
2020-05-30 19:03:15 +03:00
|
|
|
export
|
2020-05-19 20:25:18 +03:00
|
|
|
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)
|