Determine if a string is collapsible: Difference between revisions

m
Line 662:
 
collapse :: String -> String
collapse s = catMaybes $ zipWith(\a b -> if a /= b then a else Nothing) (Nothing : ms) ( ms <> [Nothing])
where ms = map Just s
 
Anonymous user