2009-08-01から1ヶ月間の記事一覧

haskell気に入ったかもしれない。

本買おうかな。何が良いのだろう?

"ghci> (length [1..10]) / 2"がerrorを吐く理由

"/"(in haskell) ≒ "/." (in OCaml)ということみたい。 以下の式を実行するとエラーになる。 ghci> (length [1..10]) / 2 <interactive>:1:0: No instance for (Fractional Int) arising from a use of `/' at <interactive>:1:0-19 Possible fix: add an instance declaration for (Fr</interactive></interactive>…

haskellで遊んでみた。

install sudo aptitude install ghc6-doc haskell-mode とりあえず、何か動かしてみる。 /usr/share/doc/ghc6-doc/index.htmlの中を見てみる。 Data.Listというもの発見*1 おおよそ、見当がついたの気がしたので使ってみる。 import Data.List l = take 5 [1…

Rakefileを再帰的に探してrake testするelisp(TB)

http://d.hatena.ne.jp/modka/20090820/1250759260 書いてみました。*1 (require 'cl) ;; (defvar raketest-old-color (frame-parameter (selected-frame) 'background-color)) (defvar raketest-output-buffer "*rake test output*") (defvar raketest-succ…

method一覧

以下の方法が一番楽かもしれない。 準備 qriを使えるようにする。*1 sudo gem install fastri fastri-server -b .emacs (require 'ansi-color) (require 'anything) (unless (fboundp 'rlet1) (defmacro let1 (var val &rest action) `(let ((,var ,val)) ,@…