title | number |
---|---|
Completion Succeeded | 65 |
Completion failed | 6 |
Completion timeouted(over 30 seconds) | 44 |
total | 115 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(load "quicklisp.lisp") | |
(quicklisp-quickstart:install) ;; quicklispのインストール | |
(ql:add-to-init-file) ;; REPL起動時にQuicklispが読み込まれるように初期化ファイルに書き込む処理 | |
(ql:system-apropos "match") ;; ライブラリを探してみる | |
(ql:quickload :cl-match) ;; ライブラリをロードしてみる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ clisp file.lisp | |
$ sbcl --script file.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(print [x | x <- '(1 2 3)]) | |
(print [(cons x y) | x <- '(1 2 3) y <- '(2 3) ]) | |
(print [(funcall f x) | f <- '(sin cos tan) x <- '(1 2 3 4 5) (evenp x)]) | |
(print [(* x y) | (x y) <- '((1 2) (3 4) (5 6))]) | |
(ql:quickload :alexandria) | |
(use-package :alexandria) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun append-1 (val var) (append var (list val))) | |
(defmacro collect (constructor &rest def) | |
(let ((result (gensym)) | |
(syms (loop for i from 1 upto (1- (length def)) collect (gensym)))) | |
`(let ((,result nil)) | |
(progn | |
,(labels | |
((main (constr def syms) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Lisp のリーダは括弧の始まりを読むと閉じ括弧までを読む | |
;; ( から ) まで | |
;; 今それと同じ機能を [] にも 持たせる | |
;; まず閉じる目印になる括弧を設定 | |
;; こいつは ) と同じ機能 | |
(set-macro-character #\] (get-macro-character #\))) | |
;; 開き括弧に会ったら、閉じ括弧まで読む | |
(set-macro-character #\[ | |
(lambda (stream char) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"SBCLの例です | |
let g:slimv_python = '/usr/bin/python' | |
let g:slimv_swank_cmd = '! xterm -e sbcl --load /usr/share/common-lisp/source/slime/start-swank.lisp &' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sbcl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(format t "hello, world~%") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(set-macro-character #\DOUBLE_DAGGER | |
(get-macro-character #\) )) | |
(set-macro-character #\DAGGER | |
(lambda (stream char) | |
(declare (ignore char)) | |
(read-delimited-list #\DOUBLE_DAGGER stream t))) | |
† defun fact † n‡ |
NewerOlder