Is there a way to see the code behind default functions like map, reduce, etc? I'm coding in visual studio code with the calva Getting Started REPL. Please explain like I'm five, if at all possible, because I am not only new to Clojure, but to programming in general. Thanks for any help. My goal is to adapt map so that it returns a set instead of a list. I am doing a task from Brave Clojure.
@oyvind.holt In the REPL, you can type (source map)
and it will print the source of the clojure.core map
function. But quite possibly you can also navigate to its definition in Calva (depending on your project setup).
Thanks, Bork. I'll try that.
You can also just navigate here https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj and search for things like "defn map"
Do you know how I navigate to the relevant REPL in VSC? I tried in what's called the output.calva-repl, but that doesn't seem to work. I'm very, very green.
@oyvind.holt Ask in #calva
Alright, thanks
@oyvind.holt , in VS Code there are commands for both peek and goto definition. The command palette is your friend. These features are also available via hovering with the mouse and pressing cmd/ctrl.
@pez Appreciated, søta bror 🙂
Hello guy! My name is Marcos Emanuel. I'm software developer and I'm starting in the clojure world. ✌️