[Haskell-cafe] groupBy without Ord?
ky3 at atamo.com
Sat Mar 22 19:23:25 UTC 2014
On Sun, Mar 23, 2014 at 1:29 AM, martin <martin.drautzburg at web.de> wrote:
> So I often wonder, where you
> would use Haskell's groupBy WITHOUT sorting first, but I assume there are
> situations, where this is useful.
But if you sorted first, then there must be an Ord-er on the elements, yes?
In which case you could then apply (sqlGroup = group . sort) as originally
I'm sure groupBy is useful standalone (dim memories of some functional
pearl) but your hunch is right in that I normally use it after a sorting
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe