Contents    Page-10    Prev    Next    Page+10    Index   

Given: (defn thecount [x] 1)
What is:
(reduce + (map thecount '((a 1) (b 2) (c 3)) ))

  • A: (1 1 1)
  • B: (1 2 3)
  • C: 1
  • D: (a b c)
  • E: 3

    Answer: E

    Since thecount always returns 1, map returns a list (1 1 1). reduce adds these to get 3.