-
-
Save aamirsahmad/00a02674e552fc33d65b947f31528149 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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