clojure.walk/walk doesn't preserve metadata on lists/seqs

Description

Example:

Patches:

  • clj-2568-1 checks if the form was a clojure.lang.IObj and if the result transformed with f is also a clojure.lang.IObj. If so, it copies the metadata from original to transformed.

  • clj-2568-2 inlines the cond form of the extra var/function that was introduced

  • clj-2568-3 allows the function arg f in postwalk to update the restored metadata (attach additional data, remove metadata, etc).

There might be an optimization possible in the anonymous function used in clj-2568-3 which can be implemented once there is agreement on the chosen direction.

Environment

None

Assignee

Unassigned

Reporter

Dominic Monroe

Labels

None

Approval

None

Patch

Code and Test

Priority

Major
Configure