これは [Haskell Advent Calendar 2012][] の11日目の記事です。
Haskell でデータ設計を便利に行う発想・方法について書きました。
[persistent][] というライブラリを活用します。
Haskell を知らなくても読めます。
主な対象読者は [プログラミングHaskell][] か [すごいHaskellたのしく学ぼう!][] を読み、Haskell をより使いたい人です。
This file contains hidden or 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
{-# LANGUAGE DeriveFunctor #-} | |
module Main where | |
import Control.Monad | |
import Control.Monad.Free | |
import Prelude hiding (putChar, getChar) | |
import qualified System.IO as IO | |
import Test.QuickCheck |
This file contains hidden or 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
-- すごいHaskell読書会 in 大阪 #3 | |
-- 練習問題 | |
-- 問題1 | |
-- 次のリスト内包を **map** と **filter** で書き直してみましょう | |
-- [ x ^ 2 | x <- [1..5], odd x] | |
-- 問題2 | |
-- 標準関数 **takeWhile'** と **dropWhile'** を実装してみましょう。 |
This file contains hidden or 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
"^ " | |
=~ ( | |
("(").("~"^"."^"^"^(""=="")."").("^" | |
^"="^(""=="").""^")").("^"^".").("=" | |
^"~"^(""=="")."").("("^(""=="^").""^ | |
"."^"^").("("^(""=="").""^"^"^")").( | |
(" ^( " | |
== " | |
") . | |
"" ^ |
NewerOlder