Lets say I’m inside of multiple mapcar functions and I’ve found the successful terminating condition. I want to stop the execution of the rest of the code.
In java, I can do System.exit(0);
Does lisp have something similar?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The equivalent of
System.exit()doesn’t really make sense in a REPL-oriented environment like Lisp; it may exist, but it won’t, say, make your function return a value.(return-from)may do what you’re looking for if your code is structured appropriately.