I have a sequence (foundApps) returned from a function and I want to map a function to all it\'s elements. For some reason, apply
and count
work for th
I have a simple explanation which this post is lacking. Let's imagine an abstract function F
and a vector. So,
(apply F [1 2 3 4 5])
translates to
(F 1 2 3 4 5)
which means that F
has to be at best case variadic.
While
(map F [1 2 3 4 5])
translates to
[(F 1) (F 2) (F 3) (F 4) (F 5)]
which means that F
has to be single-variable, or at least behave this way.
There are some nuances about types, since map
actually returns a lazy sequence instead of vector. But for the sake of simplicity, I hope it's pardonable.