software-engineering-amsterdam / ST2017_WG_12

0 stars 0 forks source link

Week 2 Exercise 3 #2

Open BertLisser opened 7 years ago

BertLisser commented 7 years ago
sortProp (_,f) (_,f') | stronger [(-10)..10] f f' = LT
                      | weaker [(-10)..10] f f' = GT
                      | otherwise = EQ

must become

sortProp (_,f) (_,f') | (stronger [(-10)..10] f f')  && not(weaker [(-10)..10] f f')= LT
                      | (weaker [(-10)..10] f f')  && not (stronger [(-10)..10] f f') = GT
                      | otherwise = EQ
Oipo commented 7 years ago

You're right, thanks. Due to the implementation of stronger and weaker, both return true in case the statements are equally strong.