-
rac takes a non-empty list and returns its last element.
;; (rac '(a b c d)) ==> d
(define rac
(lambda (ls)
))
-
rdc takes a non-empty list and returns a new list that is
similar, but with the last element removed.
;; (rdc '(a b c d)) ==> (a b c)
(define rdc
(lambda (ls)
))
-
difference takes two lists of symbols, los1
and los2, and returns a new list similar to los1,
but with all symbols that appear in los2 removed.
;; (difference '(a b c d e f g) '(d b g)) ==> (a c e f)
(define difference
(lambda (los1 los2)
))
-
length* takes a nested list of symbols and returns the
total number of symbols in the list at all depths.
;; (length* '((a b) c () ((d)))) ==> 4
(define length*
(lambda (nlos)
))
-
membern? takes a symbol sym, a number
n, and a list of symbols los,
and returns #t if and only if sym appears at least
n times in los.
;; (membern? 'a 3 '(a b a c a d)) ==> #t
;; (membern? 'a 3 '(a b a c b d)) ==> #f
(define membern?
(lambda (sym n los)
))