common-lisp

    1热度

    2回答

    我有两个包中都定义了一个类。第二个类继承了第一个类,但有一个同名的插槽。其目的确实是为了覆盖插槽。 (defpackage :foo (:use :cl) (:export foo)) (in-package :foo) (defclass foo() ((s))) (defpackage :bar (:use :cl :foo) (:expor

    0热度

    1回答

    要获得SBCL所有有效编码列表,我这样做: (let (encoding-list) (let (symbol-list) (do-external-symbols (s :keyword) (push s symbol-list)) (setf symbol-list (sort symbol-list #'string<)) (mapc (l

    3热度

    2回答

    我试图在IPv6的唯一网络合作时Clozure CL更换SBCL,但遇到这样的一个错误: MIGRATIONS> (ignore-errors (ccl:make-socket :remote-host "ya.ru" :remote-port 443)) NIL #<CCL:NO-APPLICABLE-METHOD-EXISTS #x302005215E5D> MIGRATIONS> (i

    1热度

    1回答

    试图最终开始使用asdf作为我的lisp的涂鸦,我尝试设置一个简单的示例。这些文件是 ; contents of example.asd (asdf:defsystem "example" :name "example" :depends-on ("foo") :components ((:file "example"))) 和 ; contents of ex

    1热度

    1回答

    我想用Ceramic构建一个应用程序包。我可以用它运行应用程序。 (ceramic:bundle :WEBLOCKS-TODOMVC :bundle-pathname #p"build/todomvc.tar") 运行... Ceramic: Compiling app... Launch: "/usr/local/bin/sbcl" --noinform --no-userinit --

    1热度

    1回答

    在SBCL为我打开一个不存在的文件时,请在这里我可以处理错误: (require "SB-POSIX") (let* (fd) (handler-case (setf fd (sb-posix:open "w" sb-posix:o-rdonly)) (sb-posix:syscall-error (c) (princ "error ")

    0热度

    1回答

    我试图做一个功能,将中缀输入更改为前缀,例如:(x + 1)作为输入输出为(+ x 1)。 所以这是我的时刻代码: (setq x '(Y + 1)) (if (listp x) (list (second x) (first x) (first (last x))) x) 所以返回(+ Y 1)如果我输入一个列表,如果它不是一个列表中的用户输入。 然而,问题是,我不能得到这个代码的函数工作

    -2热度

    1回答

    INPUT:(A(B(d(E)(F)))(C)(K)) 我现在有两个功能,这给我的OUTPUT: 甲 乙 ç ķ 乙 d d Ë ˚F Ë NIL 但是我需要输出这样的: 一个:BCK B:d C: k: d:电子网 E: F: 或 一个 b】S K d 电子网 (defun print-children (s) (cond ((null (caar (cdr s))) nil)

    0热度

    1回答

    我已经写了使用DO宏(用彼得·塞贝尔的书作为参考)功能,但由于某些原因,当我编译我的功能: (defun test() (do ((n 2 (1+ n)) (m 1 (1+ m)) (a (1+ n)) (b (1+ m)) (c (+ n m))) ((= n 10) (* a b c)) (print (* a

    1热度

    1回答

    我需要帮助搞清楚我有什么错我的代码中的一员,这是分配问题: 写一个递归函数命名MYMEMBER接受一个ATOM (atm)和LIST(lst),如果它是成员,则返回ATOM,否则返回0。 (MYMEMBER ‘D ‘(A B C D E F G) returns => D ex。 (MYMEMBER ‘H ‘(A B C D E F G) returns => NIL 这是我有: (defun m