First of all, thanks for sharing;
it's a very educational piece of code!
I have some generic coding advice though.
With slightly better names you can get rid of a lot of the comments. There is a lot of repetition in the code. If you factor that out, you will have even less need for comments. I highly recommend watching some Kevlin Henney talks on such topics, for example https://youtu.be/ZsHMHukIlJY?t=487 (but he has even better talks recently)
The input of the program should be supplied in a more format more natural to humans and let the computer do the transformation into whatever data structure it's comfortable with. So I would propose a simple, multi-line text as an input:
The result of `parse` function will contain character data types instead of 1 character long strings. I think in this case it's actually more readable and more concise too:
Next `println` actually accepts multiple arguments and concatenates them with a space, after stringifying them, so you can drop the extra `(str ...)` wrapping around them.
Then again, the comment is superfluous. It's obvious that you are printing stuff. If you really want to tell what is it, just wrap it in a well-named function. Eg:
(defn report [paths]
(println "The maze has" (count paths) "paths.")
(println "The shortest path in the maze is:" (count (first paths)) "steps long.")
(println "The path is" (first paths))
(println "The longest path in the maze is:" (count (last paths)) "steps long.")
(println "The path is" (last paths)))
So you can just put `(report sorted-paths)` in your `-main`.
I have some generic coding advice though. With slightly better names you can get rid of a lot of the comments. There is a lot of repetition in the code. If you factor that out, you will have even less need for comments. I highly recommend watching some Kevlin Henney talks on such topics, for example https://youtu.be/ZsHMHukIlJY?t=487 (but he has even better talks recently)
The input of the program should be supplied in a more format more natural to humans and let the computer do the transformation into whatever data structure it's comfortable with. So I would propose a simple, multi-line text as an input:
Then the code would look like this: You can also just hardwire a maze during development into the source file, since Clojure supports multiline strings: The result of `parse` function will contain character data types instead of 1 character long strings. I think in this case it's actually more readable and more concise too: Next `println` actually accepts multiple arguments and concatenates them with a space, after stringifying them, so you can drop the extra `(str ...)` wrapping around them.Then again, the comment is superfluous. It's obvious that you are printing stuff. If you really want to tell what is it, just wrap it in a well-named function. Eg:
So you can just put `(report sorted-paths)` in your `-main`.