- 同じ名詞を二回続けて発話することを禁止。
- 「今日」という単語は禁止とし、別の表現を使う。
- 相槌の「あー、○○」は、「なるほど?」にしてください。
- 相槌の「まさに」は「そうなんです」にしてください。
- 「ふむ」は禁止し「ほう」、「はい」と表現してください。
- 「ふむふむ」は禁止し「ほうほう」、「はいはい」と表現してください。
- 「萌芽」は禁止し「先駆」、「コウシ」と表現してください。
- 「大域的」は禁止し「グローバル」と表現してください。
| ;;; | |
| ;;; V(X) = sum_{k=1} floor(X / 2^k) を計算する Prolog 述語 | |
| ;;; O(log X) のステップ数で高速に再帰計算を行う | |
| ;;; | |
| (defrel &V | |
| ((_x _curr _ans) | |
| (:aux _next-curr _term _rest-ans) | |
| (== _term ,(floor _x _curr)) | |
| (> _term 0) | |
| ! |
| (de tarai (x y z) | |
| (cond ((> x y) | |
| (& (:aux _ans) | |
| (&tarai ,(tarai (1- x) y z) | |
| ,(tarai (1- y) z x) | |
| ,(tarai (1- z) x y) | |
| _ans) | |
| _ans)) | |
| (t y) )) |
| ;;; -*- mode: Lisp; coding: utf-8 -*- | |
| (defpackage :read-write-test (:use :cl)) | |
| (in-package :read-write-test) | |
| (defconstant one-hundred-million 100000000) |
| ;;; -*- mode: Lisp; coding: utf-8 -*- | |
| (cl:in-package "CL-USER") | |
| (defvar *standard-readtable* (copy-readtable nil)) | |
| (defvar *nest-level* 0) |
| ;;; -*- mode: Lisp; coding: utf-8 -*- | |
| #|| | |
| Lunar | |
| http://users.rcn.com/david-moon/Lunar/data.html#slots | |
| The last slot in a datum can be a multi-slot whose value is a special kind of succession that is embedded in the datum rather than being a separate datum. This enables variable-length classes. The value of each member of a multi-slot must be a member of the slot's declared type. | |
| The Consistent Slot Order Rule also states that only the last slot in the list can be a multi-slot. Thus no class that contains a multi-slot can have a subclass that adds more slots. |
| ;;; -*- mode: Lisp; coding: utf-8 -*- | |
| (cl:in-package "BCL-USER") | |
| (defclass init-once-slot-class (standard-class) | |
| ()) | |
| (defmethod clos:process-a-slot-option | |
| ((class init-once-slot-class) option value | |
| already-processed-options slot) |
| 今回のような場合、マクロでコード生成する(楽をしたい)のであれば関数単位というよりは全体を生成することになるかと思いました。 | |
| (defmacro doit () | |
| `(progn | |
| ;; data chunk | |
| (write-chars "data" out-stream) | |
| (write-32le (* nsmpl nch (/ nbits 8)) out-stream) ; size of data chunk | |
| (cond | |
| ,@(mapcan (lambda (nch) | |
| (mapcar (lambda (n) |
| (defun tarai (x y z) | |
| (declare (optimize (speed 3) (debug 0) (safety 0))) | |
| (labels ((tarai (x y z) | |
| (declare (fixnum x y z)) | |
| (the fixnum | |
| (if (> x y) | |
| (tarai (tarai (1- x) y z) | |
| (tarai (1- y) z x) | |
| (tarai (1- z) x y)) | |
| y)))) |