This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-27
Channels
- # announcements (1)
- # aws (8)
- # babashka (77)
- # babashka-sci-dev (8)
- # beginners (29)
- # biff (2)
- # calva (13)
- # cljs-dev (1)
- # clojure (42)
- # clojure-europe (205)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (4)
- # clojurescript (58)
- # conjure (9)
- # data-science (7)
- # datalevin (19)
- # datomic (3)
- # emacs (7)
- # fulcro (15)
- # gratitude (8)
- # lsp (52)
- # meander (3)
- # membrane (92)
- # off-topic (12)
- # re-frame (16)
- # reagent (4)
- # reitit (15)
- # releases (1)
- # sci (30)
- # shadow-cljs (34)
- # tools-deps (5)
- # xtdb (17)
so clojures' reduce has this function signature like so: (reduce f val coll)
. it would be cool if there was a way to move to each of those elements (f, val, coll)
by name or by position. Like i can move around using the parens, or the symbols, but the f
arg will likely be a lot of parens that i have to go through to get to the val or the coll.
For that matter is there anything which will just print them sort of like this...
(reduce (let [[f val coll] '[(fn [total n] (+ total n)) 0 [1 "2" 3]]]
{:f f :val val :coll coll}))
I must be missing some commands then. I have next-paren and next-symbol. If i knew what each thing was i could use those to traverse it, like i said, but it wouldn't be a direct lookup.
Nothing like, jump to coll
.
https://github.com/abo-abo/lispy is my choice
thanks @U02CV2P4J6S i'm using what ever the lisp state is thats built into spacemacs, i think it's similar. @U11BV7MTK i'm probably not articulating the idea well. It occurs to me that if the params argument is a hashmap then you get this just by searching for the key. But a lot of functions, especially clojure core, are positional bc it makes them easier to write. cider and lsp both seem to be aware of positional arguments, so i'm guessing its possible to create a something to both display a mapping from parameter name to the actual argument passed in. I'm just collecting a bunch of things i'm going to try and build that i think would be useful for me and others as i learn emacs lisp 🙂 .