Skip to content

Instantly share code, notes, and snippets.

@akanehara
Created September 18, 2014 10:01
Show Gist options
  • Save akanehara/8d985ba17487b5e58f10 to your computer and use it in GitHub Desktop.
Save akanehara/8d985ba17487b5e58f10 to your computer and use it in GitHub Desktop.
本に関するレコード型 book_t
(* 目的: 本に関するレコード型 book_t を宣言する *)
type book_t = {
title : string;
author : string;
publisher : string;
price : int;
isbn : string;
}
let book1 = {
title = "すごいErlangゆかいに学ぼう!";
author = "Fred Hebert";
publisher = "オーム社";
price = 3800;
isbn = "ISBN978-4-274-06912-3";
}
let book2 = {
title = "3分間ネットワーク基礎講座";
author = "編野衛二";
publisher = "技術評論社";
price = 1780;
isbn = "ISBN978-4-7741-3279-2";
}
let book3 = {
title = "プログラミングの基礎";
author = "浅井健一";
publisher = "サイエンス社";
price = 2300;
isbn = "ISBN978-4-7819-1160-1";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment