2015-05-03 22 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