Skip to content

Instantly share code, notes, and snippets.

@rintaun
Created April 23, 2013 18:12
Show Gist options
  • Save rintaun/5445978 to your computer and use it in GitHub Desktop.
Save rintaun/5445978 to your computer and use it in GitHub Desktop.
append = function(el, list) {
if (is_empty(list)) {
return prepend(el, list);
} else {
return prepend(head(list), append(el, tail(list)));
}
};
last = function(list) {
if (is_empty(tail(list))) {
return head(list);
} else {
return last(tail(list));
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment