summaryrefslogtreecommitdiff
path: root/src/gen_lib/vector.lem
blob: 5f239e37c8168ba4b85cec5a2ab21d6234322743 (plain)
1
2
3
4
5
6
7
8
9
open import Pervasives

type bit = B0 | B1 | BU
type vector 'a = Vector of list 'a * nat

let rec nth xs (n : nat) = match (n,xs) with
  | (0,x :: xs) -> x
  | (n + 1,x :: xs) -> nth xs n
end