Skip to main content
Note on when this will work.
Source Link
deadghost
  • 5.3k
  • 6
  • 40
  • 51

My shot at it:

(clojure.walk/postwalk #(if (map? %) (into [] (vals %)) %) nested-map) => [[5 10 [7 0 8 7] [1 10 5 1]] 8 9 10] 

Unfortunately itIt doesn't preserve order so it's effectively a dudwhen used with hash-maps; it will however, preserve order with array-maps.

My shot at it:

(clojure.walk/postwalk #(if (map? %) (into [] (vals %)) %) nested-map) => [[5 10 [7 0 8 7] [1 10 5 1]] 8 9 10] 

Unfortunately it doesn't preserve order so it's effectively a dud.

My shot at it:

(clojure.walk/postwalk #(if (map? %) (into [] (vals %)) %) nested-map) => [[5 10 [7 0 8 7] [1 10 5 1]] 8 9 10] 

It doesn't preserve order when used with hash-maps; it will however, preserve order with array-maps.

Source Link
deadghost
  • 5.3k
  • 6
  • 40
  • 51

My shot at it:

(clojure.walk/postwalk #(if (map? %) (into [] (vals %)) %) nested-map) => [[5 10 [7 0 8 7] [1 10 5 1]] 8 9 10] 

Unfortunately it doesn't preserve order so it's effectively a dud.