haystack: ["Zig","Zag","Wally","Ronald","Bush","Zig","Zag","Krusty","Charlie","Bush","Bozo"]; needle: "Zag"; findneedle(needle, haystack, [opt]):=block([idx], idx: sublist_indices(haystack, lambda([w], w=needle)), if emptyp(idx) then throw('notfound), if emptyp(opt) then return(idx), opt: first(opt), if opt='f then first(idx) else if opt='l then last(idx) else throw('unknownmode));