作者 Anonymous [actionscript] 2012-01-27 14:52 (点击下载)

  1. import qualified Prelude as P
  2.  
  3. class MyEq a where
  4. (==) :: a -> a -> P.Bool
  5. (/=) :: a -> a -> P.Bool
  6. x == y = P.not (x /= y)
  7. x /= y = x == y
  8.  
  9. data TwoValue = One | Two
  10. instance MyEq TwoValue where
  11. One == Two = P.False
  12. Two == One = P.False
  13. _ == _ = P.True
  14.  

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)