RosettaCodeData/Task/Search-a-list/Lingo/search-a-list.lingo
2016-12-05 23:44:36 +01:00

11 lines
231 B
Text

haystack = ["apples", "oranges", "bananas", "oranges"]
needle = "oranges"
pos = haystack.getPos(needle)
if pos then
put "needle found at index "&pos
else
put "needle not found in haystack"
end if
-- "needle found at index 2"