; Chapter 8 higher order functions summary
;
; EVERY
; > (every square '(1 2 3 4 5))
; (1 4 9 16 25)
; > (every square 12345)
; (1 4 9 16 25)
;
; Inputs: a function that takes one argument and a sentence or a word
; Output: a sentence
;
; KEEP
; > (keep odd? '(1 2 3 4 5))
; (1 3 5)
; > (keep odd? 12345)
; 135
;
; Inputs: a function that takes one argument and a sentence or a word
; Output: a sentence or a word (depends on second input)
;
; ACCUMULATE
; > (accumulate word '(f i sh head))
; fishhead
; > (accumulate + 1234)
; 10
; > (accumulate se 'abcd)
; (a b c d)
;
; Inputs: a combiner function that takes TWO arguments and a sentence or a word
; Output: depends on the combiner function
;
; REPEATED
; > ((repeated square 3) 2)    ; (square (square (square 2))) = 256
; 256
; > ((repeated bl 4) 'bigfoot)
; big
;
; Inputs: a function that takes one argument and a number, representing the number of times to apply it
; Output: a function, which if called, will apply the input function the number of times specified