ListTest.agda 253 B

123456789101112131415
  1. module ListTest where
  2. import AlonzoPrelude
  3. import PreludeList
  4. open AlonzoPrelude
  5. open PreludeList
  6. mynil : {A:Set} -> List A
  7. mynil = []
  8. mycons : {A:Set} -> A -> List A -> List A
  9. mycons x xs = x :: xs
  10. head : (A:Set) -> List A -> A
  11. head A (x :: xs) = x