Advertisement
tinyevil

Untitled

Mar 7th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1.  
  2. def read_list_of (n:nat) : ListOfSize n
  3. case n of
  4. 0 -> empty
  5. S m ->
  6. elt <- read_bool
  7. tail <- read_list_of m
  8. cons m v tail
  9.  
  10. def read_list : (n:nat, ListOfSize n)
  11. n <- read_nat
  12. ls <- read_list_of n
  13. (n, ls)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement