← Back to context

Comment by sethev

8 hours ago

In Clojure, vectors literally are functions. You can supply a vector (~= array) or map any place that a single parameter function is expected. So for example:

    (map v [4 5 7])

Would return you a list of the items at index 4, 5, and 7 in the vector v.

That'a great example that demonstrates the idea in the article. And it concisely shows a functional insight in the language design of Clojure. I'm not a daily Lisp user yet, but as I learn more about it, I'm drawn to its many charms.