Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jan 4th, 2013  |  syntax: Lisp  |  size: 0.12 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. (defn pos [ls elem]
  2.   (cond (empty? ls) -1
  3.         (= (first ls) elem) 0
  4.         :else (+ 1 (pos (rest ls) elem))))