mirror of
https://github.com/iritmaximus/haskell.git
synced 2026-10-12 19:13:39 +03:00
Set 5a Ex 8: check length of output list
This commit is contained in:
@@ -130,7 +130,7 @@ ex8_green = $(testing [|rgb Green|]) (?==[0,1,0])
|
||||
ex8_blue = $(testing [|rgb Blue|]) (?==[0,0,1])
|
||||
|
||||
fcmp expected actual =
|
||||
expectation expected actual (diff < eps)
|
||||
expectation expected actual (length expected == length actual && diff < eps)
|
||||
where diff = sum . map abs $ zipWith (-) actual expected
|
||||
eps = 0.01
|
||||
|
||||
|
||||
Reference in New Issue
Block a user