Set 5a Ex 8: check length of output list

This commit is contained in:
Joel Kaasinen
2024-09-13 13:25:25 +03:00
parent 8d9f004ed5
commit a228b07116
+1 -1
View File
@@ -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