- Perform exponentiation of two integers.
> (pow 5 3)
125
- Create a list of multiples of
x
.
> (multiples-of 3 5)
'(15 12 9 6 3)
- Given a list, return a list of even numbers only.
> (even-only '(1 2 3 4 5 6))
'(2 4 6)
- Given a list of numbers, return the product.
> (product '(5 7 10))
350
- Given a list of numbers, return the smallest value.
> (smallest '(5 2 20 -1 6))
-1
- Given two sorted lists of numbers, return a list containing all of the numbers from both lists, also sorted.
> (merge '(1 3 6) '(2 4 9 10))
'(1 2 3 4 6 9 10)
- Given a value
n
, return the first n
fibonacci numbers.
> (fiblist 5)
'(5 3 2 1 1)