procedure lindex(lst, x) #: generate indices for items matching x local i every i := 1 to *lst do if lst[i] === x then suspend i end