Split a character string based on change of character: Difference between revisions
Content deleted Content added
Line 24: | Line 24: | ||
<br><br> |
<br><br> |
||
=={{header| |
=={{header|AppleScript}}== |
||
{{Trans|JavaScript}} |
{{Trans|JavaScript}} |
||
<lang AppleScript>on run |
<lang AppleScript>on run |
||
Line 151: | Line 151: | ||
end if |
end if |
||
end tail</lang> |
end tail</lang> |
||
{{Out}} |
|||
<pre>g, HHH, 5, YY, ++, ///, \</pre> |
|||
=={{header|Haskell}}== |
|||
<lang Haskell>import Data.List (group, intercalate) |
|||
main :: IO () |
|||
main = putStrLn $ intercalate ", " (group "gHHH5YY++///\\")</lang> |
|||
{{Out}} |
{{Out}} |