O(n) list reverse
foldLeft vs. foldRight: flatten
type inference