http://www.perlmonks.org?node_id=942976


in reply to Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)

> s.chars.chunk { |c| c }.map { |c, cs| xs.join } => ["Z", "BBB", "C", "ZZ"]
  • Comment on Re: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
  • Download Code