2015-05-03 29 views

回答

7

沒有太多的證明。有一個簡單的規則(不能解釋或分解成更小的任何東西)case聲明試圖匹配undefined對構造函數的結果undefined。一旦你接受這條規則,我們可以觀察到

undefined ++ ys 
= { by definition of ++ } 
case undefined of 
    [] -> ys 
    x:xs -> x : (xs ++ ys) 
= { case that matches undefined against a constructor } 
undefined