この原稿の最新版について この原稿に加筆した最新版が書籍「プログラミングGauche」に収録されています。 引用や紹介をされる方はなるべく書籍収録版を参照してください。 他の言語のプログラマがSchemeプログラムを書くとき、 どうしても発想が手続き的(procedural)になりがちです。 LispプログラマやSchemeプログラマの発想は手続き的な発想とはどうも違うらしい、 ということは分かるのですが、具体的に何が違うのでしょうか? ここではこの謎に迫ってみましょう。 実例 例えばこんな例題があります。 1から100までの数をプリントするプログラムを書け。ただし3の倍数のときは数の代わりに「Fizz」と、5の倍数のときは「Buzz」とプリントし、3と5両方の倍数の場合には「FizzBuzz」とプリントすること。 どうしてプログラマに・・・プログラムが書けないのか? (原題: Why
PyDbLite, a small in-memory database engine (Python recipe) by Pierre Quentel A small, fast, in-memory database management program The database object supports the iterator protocol, so that requests can be expressed with list comprehensions or generator expressions instead of SQL. The equivalent of : cursor.execute("SELECT name FROM table WHERE age=30") rows = cursor.fetchall() is : rows = table(
If you have a little Scheme under your belt, just plunge into the challenge right now: We want to find three integers, x y and z such that both are in the range [2,9] and that they are the lengths of the sides of a right triangle (x^2 = y^2 + z^2). The challenge is to write two procedures, in-range and fail such that the solution to the problem looks like this: (let ((x (in-range 2 9)) (y (in-rang
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く