Jump to content

Determine if a string is squeezable: Difference between revisions

m
No edit summary
Line 716:
</pre>
=={{header|Haskell}}==
<lang haskell>import Text.Printf (printf)
import Text.Printf (printf)
 
input :: [(String, Char)]
Line 742 ⟶ 741:
main =
mapM_ (\(a, b, c) -> printf "squeeze: '%c'\nold: %3d «««%s»»»\nnew: %3d «««%s»»»\n\n" c (length a) a (length b) b)
$ (\(s, c) -> (s, collapse s c, c)) <$> input</lang>
</lang>
{{out}}
<pre>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.