13 lines
343 B
Text
13 lines
343 B
Text
+ haystack : ARRAY[STRING];
|
|
haystack := "Zig Zag Wally Ronald Bush Krusty Charlie Bush Bozo".split;
|
|
"Washington Bush".split.foreach { needle : STRING;
|
|
haystack.has(needle).if {
|
|
haystack.first_index_of(needle).print;
|
|
' '.print;
|
|
needle.print;
|
|
'\n'.print;
|
|
} else {
|
|
needle.print;
|
|
" is not in haystack\n".print;
|
|
};
|
|
};
|