Advertisement
Guest User

Untitled

a guest
Jan 4th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.12 KB | None | 0 0
  1. (defn pos [ls elem]
  2.   (cond (empty? ls) -1
  3.         (= (first ls) elem) 0
  4.         :else (+ 1 (pos (rest ls) elem))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement