TIL:
peek
and pop
behave differently on vectors vs lists and throw on some special sequences… I replaced them with first
and rest
instead, but still have to learn how and why they would be used in Clojure(s/split #"\n\n")
instead of partition to split the inputre-seq
to split a sequence into alternative partsmap
to all of them, which would have helped with the initial stack input (a string is also a seq)I really like this transpose-based parsing approach (adapted from @motform):
reduce
for iteration, but I like how it displays the slower one-by-one stack operation of the CrateMover9000 vs the fast all-at-once chunk moving of the CrateMover9001 :)