Created
September 18, 2014 10:17
-
-
Save akanehara/c23007a36fad55b5cd88 to your computer and use it in GitHub Desktop.
お小遣い帳
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
(* 日付 *) | |
type date_t = { | |
year : int; | |
month : int; | |
day : int; | |
} | |
(* 目的: お小遣い帳の情報を格納するレコード型 okozukai_t *) | |
type okozukai_t = { | |
title : string; | |
price : int; | |
place : string; | |
date : date_t; | |
} | |
let okozukai1 : okozukai_t = { | |
title = "すごいErlangゆかいに学ぼう!"; | |
price = 3800; | |
place = "ジュンク堂書店"; | |
date = { year = 2014; month = 7; day = 30; } | |
} | |
let okozukai2 : okozukai_t = { | |
title = "3分間ネットワーク基礎講座"; | |
price = 1780; | |
place = "紀伊國屋書店"; | |
date = { year = 2009; month = 2; day = 14; } | |
} | |
let okozukai3 : okozukai_t = { | |
title = "プログラミングの基礎"; | |
price = 2300; | |
place = "Amazon.co.jp"; | |
date = { year = 2011; month = 10; day = 3; } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment