Ruby injeta condicionalmente!
[32] pry(main)> words = %w{mary had a little lamb} => [“mary”, “had”, “a”, “little”, “lamb”][33] pry(main)> total = words.inject(0){ |result, word| word.size + result} => 18[34] pry(main)> total = words.inject(0){ …
Continuar lendo