beginners

2025-12-29T16:51:01.488819Z

Has anyone ever used https://clojuredocs.org/clojure.walk for things like simple graph traversal? I've been playing around with graph stuff in clojure and am now wondering whether this is the more idiomatic way to work with graph-like structures.

1
p-himik 2025-12-29T16:56:13.099399Z

It works well when the graph is actually an unweighted tree with all child nodes being Clojure collections or scalar values inside parent collections. And when your pre/post-walk functions need to know only the value at the current node, regardless of any details of the path to that node. In other words, plenty of limitations when it comes to graphs in general but a very nice library when it comes to nested data structures where each datum can be processed in isolation.

2025-12-29T16:57:54.681429Z

Cool, thank you!

2025-12-29T18:00:27.634169Z

slightly off topic, but I have found that when doing work immutable graphs, converting to adjacency list format makes things much simpler. especially when the graph is cyclic

➕ 2
2025-12-29T18:22:07.607529Z

Yeah, I think that's kind of what I am implicitly doing in my model

2025-12-29T18:22:41.953919Z

I was just wondering whether that's actually a good idea, but it seems my intuition hasn't been completely off there

2025-12-29T19:44:21.266459Z

If you'll excuse the shameless plug, I wrote a library a while back that you might find interesting: https://github.com/ont-app/igraph .

💛 1
Alex Miller (Clojure team) 2025-12-29T16:54:01.597059Z

This is the last week for the https://www.surveymonkey.com/r/clojure2025 and we would really like your feedback! In particular, we have a page of questions specifically for new users of Clojure to collect information about how people learn and where they struggle. Thanks!

1