Welcome! Please see the About page for a little more info on how this works.
May I know the rationale behind postwalk-replace/prewalk-replace to accept a map for replacing forms instead of functions? Functions provide ability to have some logic which is not possible via smap
Seems to me like "postwalk-replace that accepts a function instead of a map" is just postwalk. Because all that postwalk-replace does is to call postwalk with (fn [x] (if (contains? smap x) (smap x) x)). Or am I missing something?
postwalk
postwalk-replace
(fn [x] (if (contains? smap x) (smap x) x))