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"]
|
---|
In Section
Meditations
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"]
|
---|