group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test. It is about 40% faster than groupBy (==)
group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test.
group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test.
'group' $ 'cycle' "Mississippi" = "M" : "i" : "ss" : "i" : "ss" : "i" : "pp" : "i" : "M" : "i" : ...
>>> group "Mississippi" ["M","i","ss","i","ss","i","pp","i"]
>>> group [1, 1, 1, 2, 2, 3, 4, 5, 5] [[1,1,1],[2,2],[3],[4],[5,5]]
>>> group "Mississippi" ["M","i","ss","i","ss","i","pp","i"]
>>> group [1, 1, 1, 2, 2, 3, 4, 5, 5] [[1,1,1],[2,2],[3],[4],[5,5]]
>>> S.toList $ mapped S.toList $ S.group $ each "baaaaad" ["b","aaaaa","d"] :> ()
>>> S.toList $ concats $ maps (S.drained . S.splitAt 1) $ S.group $ each "baaaaaaad" "bad" :> ()
group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test. It is about 40% faster than groupBy (==)
group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test.
>>> group "Mississippi" ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test.
group "Mississippi" = ["M","i","ss","i","ss","i","pp","i"]It is a special case of groupBy, which allows the programmer to supply their own equality test.