Search found 2 matches

by Neigel
Sun Apr 29, 2012 9:05 pm
Forum: Common Lisp
Topic: Odd Sort Behavior
Replies: 4
Views: 6883

Re: Odd Sort Behavior

I understand that Sort is destructive, and I have no issue with that. My issue is that I have two separate lists in the program, say list1 and list2. And when I call (setf list2 (sort list2 #'string)), in addition to sorting list2, I find that the contents of list1 have changed. This seems very odd ...
by Neigel
Sun Apr 29, 2012 4:11 pm
Forum: Common Lisp
Topic: Odd Sort Behavior
Replies: 4
Views: 6883

Odd Sort Behavior

I recently wrote a cryptarithmetic solver for a school project and have been tweaking it to try to improve it for fun. In the program, it takes the two operands and sum as lists, and creates a fourth list of unique variables in the problem. For example, from the problem EAT + THAT = APPLE, it create...