Search found 104 matches
- Thu Feb 21, 2008 10:37 pm
- Forum: newLISP newS
- Topic: Dictionary/Hash problem
- Replies: 5
- Views: 2700
Yes this is chess code. I'm converting my CPAN modules to newLISP. I use this kind of code as a learning project for languages new to me and those that I haven't used in a long time. Closest thing to this was a similar effort in scheme. In general this comes down to parsing chess notation (algebraic...
- Wed Feb 20, 2008 8:21 pm
- Forum: newLISP newS
- Topic: Dictionary/Hash problem
- Replies: 5
- Views: 2700
- Wed Feb 20, 2008 7:00 pm
- Forum: newLISP newS
- Topic: Dictionary/Hash problem
- Replies: 5
- Views: 2700
So it should be: define (init-board) (board "a1" (list "r" "w" "w")) (board "b1" (list "n" "w" "b")) (board "c1" (list "b" "w" "w")) (board "d1" (list "q" "w" "b")) (board "e1" (list "k" "w" "w")) (board "f1" (list "b" "w" "b")) (board "g1" (list "n" "w" "w")) (board "h1" (list "r" "w" "b"))) instea...
- Wed Feb 20, 2008 5:17 pm
- Forum: newLISP newS
- Topic: Dictionary/Hash problem
- Replies: 5
- Views: 2700
Dictionary/Hash problem
Given code that looks like this: (context 'board) (define (board:board key value) (if value (context 'board key value) (context 'board key))) (define (init-board (board "a1" (list "r" "w" "w")) (board "b1" (list "n" "w" "b")) (board "c1" (list "b" "w" "w")) (board "d1" (list "q" "w" "b")) (board "e1...