(dolist (var init-form result) S式 ... )
dolist は名前が示すように、リストに関係があります。最初に init-form を評価します。このとき、評価結果はリストでなければいけません。リスト以外の場合はエラーとなります。dolist は、このリストの要素を順番に変数 var に代入して S 式を評価します。リストの要素がなくなったら result を評価し、その値が dolist の返り値になります。次の例を見てください。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dither-xpm (color1 color2) | |
"Return an XPM dither string representing." | |
(format "/* XPM */ | |
static char * dither[] = { | |
\"12 18 2 1\", | |
\". c %s\", | |
\" c %s\", | |
\"....... . . \", | |
\".. . . . \", | |
\"..... . . . \", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Original1: https://gist.github.com/875864 saiten / rec_radiko.sh | |
# Original2: http://backslash.ddo.jp/wordpress/archives/1020 http://backslash.ddo.jp/tools/rec_radiko2.txt | |
# Install: wget swftools rtmpdump ffmpeg http://d.hatena.ne.jp/zariganitosh/20130120/radiko_recoding_again | |
PATH=$PATH:/usr/local/bin | |
VERSION=3.0.0.01 | |
# 使い方 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
※以下は emacs-25 リリース前のものなので現在では内容が古くなっているかもしれません。 | |
emacs-25(以降)の README.txt も参照してみてください。 | |
■各パッチについて | |
emacs-24.5-*.diff は emacs-24.5 に対するパッチです。 | |
□emacs-24.5-x64.diff (https://gist.github.com/rzl24ozi/68c29ac4fe64f1aa8887) | |
GNU emacs(x64) (http://hp.vector.co.jp/authors/VA052357/emacs.html) | |
に同梱のパッチ | |
(GNU emacs(x64) インストール後に C:\Program Files\GNU\Emacs23\distfiles\ |
この文章はClojure Advent Calendar 2013の20日目分です。
ClojureScriptの登場によって、私たちはWebアプリケーションのサーバサイドとクライアントサイドをClojureファミリーの言語で実装することができるようになった……ということは改めて触れるまでもなくご存知かと思います。しかし、私たちがWebを利用するときにはWebブラウザというコンポーネントを利用します。Clojurianがクライアントサイドで掌握したのはその一部分、ブラウザへ入力するデータです。Web系Clojurianの次のターゲットはブラウザ、となるのは自然な流れでしょう。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns euler.problem011 | |
(:require [clojure.string :as string])) | |
(defn parse-numbers | |
[input] | |
(for [line (->> (string/split-lines input) | |
(map #(re-seq #"\d+" %))) | |
:when (not-empty line)] | |
(map #(Long/parseLong %) line))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns reader-test) | |
(alter-var-root #'*default-data-reader-fn* (fn [_] cons)) | |
#defn(fibs [n] | |
#letfn([#f([a b] #lazy-seq(#cons(a, #f(b, #+(a, b)))))] | |
#take(n, #f(0, 1)))) | |
; #fibs(10) => (0 1 1 2 3 5 8 13 21 34) |
NewerOlder