Adding `reverse` and `sortBy` to `Traversable`
Folks[1] have known for a long time that `reverse` and `sortBy` can both be implemented in terms of `mapAccumL`. Would it make sense to add those to `Data.Traversable` as functions or methods? [1] For example, Will Fancher wrote about it in 2017. --- Sent from my phone with K-9 Mail.
Here's the mentioned article, for anyone interested: https://elvishjerricco.github.io/2017/03/23/applicative-sorting.html On 2025-10-28 06:29, Keith wrote:
Folks[1] have known for a long time that `reverse` and `sortBy` can both be implemented in terms of `mapAccumL`. Would it make sense to add those to `Data.Traversable` as functions or methods?
[1] For example, Will Fancher wrote about it in 2017. ------------------------------------------------------------------------ Sent from my phone with K-9 Mail.
_______________________________________________ Haskell-Cafe mailing list --haskell-cafe@haskell.org To (un)subscribe, modify options or view archives go to: Only members subscribed via the mailman list are allowed to post.
participants (2)
-
Isaac Elliott -
Keith