list-index (Scheme)


/ Published in: Lisp
Save to your folder(s)

This one drove me crazy because of the requirement to return -1 if s not in los.

(list-index s los) returns the zero-based index of the first
occurence of s in los, or -1 if there is no occurences of s in los.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.