clisp
Solving recursive Towers of Hanoi in Lisp
My code in lisp is as follows: (defun solve-hanoi(from) (hanoi (length from) from \'() \'())) (defun hanoi(height from to aux) (when (>= height 1)[详细]
2023-04-12 10:43 分类:问答Common Lisp Binary Tree
I am trying to write a program in Common Lisp using GNU ClISP to c开发者_JS百科ompile it. I would like to enter a list such as (A(B (C) ()) (D (E) (F (G) ()))) and depending on the first word print ou[详细]
2023-04-12 09:03 分类:问答How to change SBCL's current directory?
It is very easy to change CLisp\'s current working directory: >cat ~/.clisprc.lisp ;;; The following lines added by ql:add-to-in开发者_运维百科it-file:[详细]
2023-04-12 04:43 分类:问答Lisp - modify A* to check for best cost, receive list of goal nodes
I am trying to modify an existing Hill-climb function, which takes two node names (such as A and E), and has an optional parameter which is used recursively (a queue). I\'m trying to define a function[详细]
2023-04-11 21:45 分类:问答Inspecting a variable in the lisp SLIME debugger
I am trying to inspect the value of a variable 开发者_如何学运维at a determined breakpoint. Here is my simplified code:[详细]
2023-04-11 11:41 分类:问答How can i implement "doc" function in clisp?
In clojure, i can use doc as below: Clojure> (doc juxt) ------------------------- clojure.core/juxt ([f] [f g] [f g h] [f g h & fs])[详细]
2023-04-09 10:07 分类:问答How can i use "loop for" in this situation?
The following code will raise: SYSTEM::%E开发者_运维问答XPAND-FORM: (SETQ NUM (SUBSTRING LINE 6)) should be a lambda expression.[详细]
2023-04-06 20:10 分类:问答What's the best way to sort a hashtable by value?
Now i have to copy the hastable to a list before sorting it: (defun good-red () (let ((tab (make-hash-table)) (res \'()))[详细]
2023-04-06 19:02 分类:问答What's the corresponding standard function of atoi in clisp?
In visual lisp, you can use (atoi \"123\") to convert \"123\" to 123.It seems there is no \"atoi\" like function in clisp ?[详细]
2023-04-06 14:01 分类:问答How can i change clisp's current directory once started?
In ghci, i can use \"cd\" to change its current directory as below: $cat ~/.ghci :def hoogle \\str -> return $ 开发者_如何学Go\":! hoogle --count=15 \\\"\" ++ str ++ \"\\\"\"[详细]
2023-04-06 09:52 分类:问答