A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
13
Task/Search-a-list/Lisaac/search-a-list.lisaac
Normal file
13
Task/Search-a-list/Lisaac/search-a-list.lisaac
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
+ 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;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue