fork download
  1. zzz = {}
  2.  
  3. 'aeiou'.split('').each do |c|
  4. zzz[c] = ->(s) { s.include?(c) }
  5. end
  6.  
  7.  
  8. puts zzz['u'].call('sack')
  9. puts zzz['u'].call('pituh')
  10. puts zzz['a'].call('babah')
  11. puts zzz['a'].call('suck')
Success #stdin #stdout 0s 4760KB
stdin
Standard input is empty
stdout
false
true
true
false