原帖由 sw2wolf 于 2009-5-31 08:39 发表
type T = StackSet (NonNegative Int) Int Char Int Int
prop_double_swap (ss :: T) (t1 :: NonNegative Int) (t2 :: NonNegative Int) =
t1 `tagMember` ss && t2 `tagMember` ss ==>
ss == swap (swap ss)
where swap = swapWorkspaces t1 t2
请解释下这段代码, 尤其是 “==>” !
我个人猜测:
代码意思是将ss中的t1与t2交换两次后, ss还是原来的ss。
但“==>”以前没见过, 不知道什么意思?
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |