#!/usr/bin/ruby
#
## https://rosettacode.org/wiki/Search_a_list
#
var haystack = %w(Zig Zag Wally Ronald Bush Krusty Charlie Bush Bozo);
%w(Bush Washington).each { |needle|
var i = haystack.first_index{|item| item == needle};
if (i >= 0) {
say "#{i} #{needle}";
} else {
say "#{needle} is not in haystack";
}
}