iota takes a number n and returns
a list with n numbers from 0 to n-1.
;; (iota 5) ==> (0 1 2 3 4)
(define iota
(lambda (n)
))
swapper takes three arguments: an item
x, an item y, and a list ls.
It builds a new list in which each top-level occurrence of
x in ls is replaced by y, and
each top-level occurrence of y in ls is
replaced by x.
;; (swapper 'cat 'dog '(my cat eats dog food))
;; ==> (my dog eats cat food)
(define swapper
(lambda (x y ls)
))
all-same? takes a list ls as its
argument and tests whether all top-level elements of
ls are the same.
;; (all-same? '(a a a a a)) ==> #t
;; (all-same? '(a b a b a)) ==> #f
(define all-same?
(lambda (ls)
))
max* receives a non-empty (and possibly deep)
list of numbers ls and returns the greatest number
in the list.
;; (max* '((-21 -24 -25) ((2 3 5 7 11 13) (10 20)) 14)) ==> 20
(define max*
(lambda (ls)
))