Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write a function remv to remove list elements from a list (single elements or lists). ex: (remv '(a b) '(a b) c)) -> (a b c)
- Write a function remv_dub to remove duplicate elements (single elements or lists) from a list. ex: (remv_dub '(a b (a) c b (a))) -> (a b c (a)))
- Write a function lists to return the list elements of a list. ex: (lists '(1 (2 3) (4) 5)) -> ((2 3) (4))
- Write a function sec_min to return the second smallest integer in a list. ex: (sec_min '(1 3 2 5 4)) -> 2
- Write a function tri that will determine whether an integer is a triangular number (the formula (n*(n-1)/2) must not be used). ex: (tri 21) -> T
- Write a function perm to generate the permutations of the identity list from 1 to n. The higher order function mapcar will be useful. ex: (perm'(3)) -> ((1 2 3) (2 1 3) (2 3 1) (1 3 2) (3 1 2) (3 2 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement