Walk is a bit of a mess. It seems we should be able to do something more elegant, using recursion schemes or something.
For motivation see jgm/pandoc#7130.
Here we have walk fixLinks where fixLinks is [Inline] -> [Inline].
It works fine if applied to [Inline]. However, it behaves differently if you apply it to Inlines. Seems like instead of having instances specifically for lists, we should have general instances that work for all Traversable/Foldable structures, including Many.
Walk is a bit of a mess. It seems we should be able to do something more elegant, using recursion schemes or something.
For motivation see jgm/pandoc#7130. Here we have
walk fixLinks
wherefixLinks
is[Inline] -> [Inline]
. It works fine if applied to[Inline]
. However, it behaves differently if you apply it toInlines
. Seems like instead of having instances specifically for lists, we should have general instances that work for all Traversable/Foldable structures, including Many.