【Perl,PHP】LLバトルロワイヤル20【Ruby,Python】at TECH
【Perl,PHP】LLバトルロワイヤル20【Ruby,Python】 - 暇つぶし2ch565:デフォルトの名無しさん
12/02/10 00:06:23.43
(>>562の続き)
[局所宣言]
==== Ruby: 前スレ>>710 ====
 ys = xs.map { |x|
   h = if x.first_page? then generate_header else nil end
   b = generate_body x
   f = if x.last_page? then generate_footer else nil end

   Document.new h, b, f
 }


==== Standard ML: 前スレ>>772 ====
 datatype 'a Option = None | Some of 'a
 val ys = map (
   fn x =>
     let
       val h = if is_first_page x then generate_header else None
       val b = generate_body x
       val f = if is_last_page x then generate_footer else None
     in
       (h, b, f)
     end
 ) xs
(続く)


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch