Search found 3 matches
- Sat May 01, 2010 9:11 am
- Forum: Common Lisp
- Topic: Get a column as a list
- Replies: 6
- Views: 6381
Re: Get a column as a list
Thanks, solved! Now I came up with another problem. Consider this function: (defun list-intersection (l1 l2) (cond ((null l1) nil) ((member (first l1) l2) (cons (first l1) (list-intersection (rest l1) l2))) (t (list-intersection (rest l1) l2)))) It works fine with: (A B C) and (H F A) -> (A), but I ...
- Sat Mar 13, 2010 12:18 pm
- Forum: Common Lisp
- Topic: Get a column as a list
- Replies: 6
- Views: 6381
Re: Get a column as a list
Thanks for the reply.
I'll give it a try.
I'll give it a try.
- Sat Mar 13, 2010 8:49 am
- Forum: Common Lisp
- Topic: Get a column as a list
- Replies: 6
- Views: 6381
Get a column as a list
Hi, I'm trying to implement a simple sudoku solver and came up with this problem: Consider this: (defvar board '( (1 0 0 0 0 7 4 0 0) (9 0 6 4 0 0 0 0 0) (0 5 0 8 3 0 0 0 0) (3 6 0 0 0 0 0 0 5) (0 0 0 0 2 0 0 0 0) (5 0 8 0 0 0 0 1 4) (0 0 0 0 7 3 0 9 0) (0 0 0 0 0 8 7 0 6) (0 0 5 9 0 0 0 0 1))) How ...