Reputation: 23
(defun listmover-fun (l n)
(if (= n (len l)))
(last l )
(position n 1)
listmover-fun (l n+1)
)
Trying to figure out how to iterate through a list in ACL2, I know it can be done in lisp but I can't use those functions. Any tips would be greatly appreciated.
Upvotes: 1
Views: 79
Reputation: 109
Iteration in ACL2 is done through recursion. there is no "iteration"
Upvotes: 2