Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. exception error;
  2.  
  3. fun first (x::xs, n) = nth(x, n);
  4.  
  5. fun tagliste (n, []) = []
  6. | tagliste (0, x::xs) = []
  7. | tagliste (n, x::xs) =
  8. if length x < n+1
  9. then raise error
  10. else first (x::xs, n)::tagliste(n, xs);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement