@anonymous/

LegalDangerousTopi

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
f=->s{(s.chars-[' ']).uniq.map{|c|c*s.count(c)}}

p f["hello world!"]
p f["A man, a plan, a canal: Panama!"]
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]