by shigemk2

当面は技術的なことしか書かない

2013-04-19から1日間の記事一覧

97 Things Every Programmer Should Know 8 The Boy Scout Rule

If you find a mess on the ground, you clean it up regardless of who might have made it. Always check a module in cleaner than when you checked it out? You don't have to make every module perfect before you check it in. あまりにも基礎中の基…

対話によるCommon Lisp入門 35 reverse その2

前回だと、処理する時間が リストの長さのほぼ2乗に比例した時間がかかる。なので、末尾再帰を用いて、反転の中間結果をreversed 残りの反転すべき部分リストをlstとして処理したらいいんじゃない? [1]> (defun reverse$ (lst) (reverse-loop lst nil)) REVE…