working thru Paradigms of Artificial Intelligence Programming (from https://github.com/norvig/paip-lisp)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

47 lines
2.4 KiB

#0Y_ #0Y |CHARSET|::|UTF-8|
(|COMMON-LISP|::|SETQ| |COMMON-LISP|::|*PACKAGE*|
(|SYSTEM|::|%FIND-PACKAGE| "PAIP"))
(|SYSTEM|::|C-PROCLAIM| '(|COMMON-LISP|::|SPECIAL| |PAIP|::|*TITLES*|))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|FIRST-NAME|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|NAME|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|LAST-NAME|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|NAME|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|POWER|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|N| |PAIP|::|M|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|COUNT-ATOMS|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|EXPR|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|COUNT-ALL-ATOMS|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE|
'(|PAIP|::|EXPR| |COMMON-LISP|::|&OPTIONAL| (|PAIP|::|IF-NULL| 1.))))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|COUNT-ANYWHERE|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE|
'(|PAIP|::|OBJ| |PAIP|::|EXPR| |COMMON-LISP|::|&OPTIONAL|
(|PAIP|::|TEST| #'|COMMON-LISP|::|EQ|))))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|DOT-PRODUCT|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|LIST1| |PAIP|::|LIST2|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|MAPPEND|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|FN| |COMMON-LISP|::|LIST|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|ONE-OF|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|COMMON-LISP|::|SET|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|RANDOM-ELT|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|CHOICES|)))
(|SYSTEM|::|C-PROCLAIM| '(|COMMON-LISP|::|SPECIAL| |PAIP|::|*SIMPLE-GRAMMAR*|))
(|SYSTEM|::|C-PROCLAIM| '(|COMMON-LISP|::|SPECIAL| |PAIP|::|*GRAMMAR*|))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|RULE-LHS|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|RULE|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|RULE-RHS|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|RULE|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|REWRITES|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|CATEGORY|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|GENERATE|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|PHRASE|)))
(|SYSTEM|::|C-PROCLAIM| '(|COMMON-LISP|::|SPECIAL| |PAIP|::|*BIGGER-GRAMMAR*|))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|GENERATE-TREE|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|PHRASE|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|GENERATE-ALL|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|PHRASE|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|COMBINE-ALL|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE| '(|PAIP|::|XLIST| |PAIP|::|YLIST|)))
(|SYSTEM|::|C-DEFUN| '|PAIP|::|CROSS-PRODUCT|
(|SYSTEM|::|LAMBDA-LIST-TO-SIGNATURE|
'(|PAIP|::|FN| |PAIP|::|AS| |PAIP|::|BS|)))