- Given a list of numbers, return a list with each number multiplied by a constant:
> (mult-by 4 '(5 2 3 8))
'(20 8 12 32)
- 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
- Create a list of multiples of
x
.
> (multiples-of 3 5)
'(15 12 9 6 3)
- Given a list of numbers, return the smallest value.
> (smallest '(5 2 20 -1 6))
-1
- Given a list of numbers, return the reciprocals. Skip zero if present.
> (reciprocals '(4 3 1 0 8))
'(1/4 1/3 1 1/8)