ブーリアンロジック・CLISPの勉強
i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. [1]> (defun demorgan-and (x y) (not (or (not x) (not y)))) DEMORGAN-AND
でド・モルガンのANDができます。
(Common LISP: A Gentle Introduction to Symbolic Computation より引用)
Break 4 [12]> (mapcar #' (lambda (n) (* n n )) '(4 6 8 10 12 22)) (16 36 64 100 144 484)
でラムダ式で入力された値の2乗を計算できます。
Break 4 [12]> (mapcar #' (lambda (n) (* n n n )) '(4 6 8 10 12 22)) (64 216 512 1000 1728 10648)
でラムダ式で入力された値の3乗を計算できます。
おまけ:
Montezuma
Montezuma is a full-text indexing/search engine library written entirely in Common Lisp.
https://code.google.com/p/montezuma/
XORによる暗号化