Skip to content

Instantly share code, notes, and snippets.

@aamirsahmad
Created July 10, 2019 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aamirsahmad/00a02674e552fc33d65b947f31528149 to your computer and use it in GitHub Desktop.
Save aamirsahmad/00a02674e552fc33d65b947f31528149 to your computer and use it in GitHub Desktop.
(defun locatePositions (x list &optional (n 1) (result '()))
(if (null list)
result
(if (myEqual (car list) x)
(append result n))
)
(locatePositions x (cdr list) (+ n 1) result)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment