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
(+ 1 2 3) ;; 1 + 2 + 3 = 6 | |
(+ 1 2 (* 3 4) (/ 6 3)) ;; 1 + 2 + 3 * 4 + 6/3 = 17 | |
(1+ (- 7 4)) ;; 4 |
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 [runtime option] --end-runtime-options [toplevel option] --end-toplevel-options [user option] |
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
(setf *random-state* (make-random-state t)) | |
(defun make-function-name (sym) | |
(let ((fname | |
(string-upcase (concatenate 'string "MAKE-" (symbol-name sym))))) | |
(multiple-value-bind (sym pack) (find-package fname) | |
(declare (ignore pack)) | |
(if sym sym (intern fname))))) |
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
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-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
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-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
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-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
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-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
(in-package :cl-user) | |
(ql:quickload :clx) | |
(ql:quickload :mcclim) | |
(defpackage app | |
(:use :clim | |
:clim-lisp)) | |
(in-package :app) |
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
(use :yacc) | |
(defun integer? (ch) | |
(handler-case | |
(progn | |
(parse-integer (string ch)) | |
t) | |
(error (c) (declare (ignore c)) | |
nil))) |
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
Inductive nat : Type := | |
| O : nat | |
| S : nat -> nat. | |
Inductive bool : Type := | |
| true : bool | |
| false: bool. | |
Fixpoint lessthan (n : nat) (m : nat) : bool := |
OlderNewer