úÎ ™ A replacement for (c) Donnacha Oisín Kidney, 2018MITmail@doisinkidney.com experimentalportable Trustworthy ŽYGroups adjacent elements according to some relation. The relation can be an equivalence:groupBy (==) "aaabcccdda"["aaa","b","ccc","dd","a"]groupBy (==) [][]{However, it need not be. The function compares adjacent elements only, so it can be used to find increasing subsequences:"groupBy (<=) [1,2,2,3,1,2,0,4,5,2][[1,2,2,3],[1,2],[0,4,5],[2]]It is fully lazy:#head (groupBy (==) (1:2:undefined))[1]/(head . head) (groupBy undefined (1:undefined))13(head . head . tail) (groupBy (==) (1:2:undefined))2(xs === concat (groupBy (applyFun2 p) xs)+all (not . null) (groupBy (applyFun2 p) xs)Groups adjacent equal elements.group "aaabcccdda"["aaa","b","ccc","dd","a"]Safe Þ       &groupBy-0.1.0.0-K6aizQaJGHNIKCqiVhOR0wData.List.GroupBy Data.ListgroupBy Paths_groupBygroupversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName