Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function nth(list, n){
  2.     if (list == null){
  3.         return undefined;
  4.     }
  5.     else if(n != 0){
  6.         return nth(list.rest, n - 1);
  7.     }
  8.     return list.value;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement