Adds all the simplifications for Array.isEmpty mention in #169
[x] Array.isEmpty (Array.fromList [x]) -> False
[x] Array.isEmpty (Array.fromList []) -> True
[x] Array.isEmpty Array.empty -> True
[x] Array.isEmpty (Array.repeat 2 x) -> False
[x] Array.isEmpty (Array.initialize 2 f) -> False
I didn't mention the Array.isEmpty (Array.initialize 2 f) to False (same for repeat) in the changelog nor documentation.
At the moment, we get 2 errors when doing Array.isEmpty (Array.fromList []). What do you think, is that a problem? I think it's okay, and I don't have a nice way around this. We'll have the same problem if we see repeat 0 or repeat 1 (or with initialize).
Adds all the simplifications for
Array.isEmpty
mention in #169Array.isEmpty (Array.fromList [x])
->False
Array.isEmpty (Array.fromList [])
->True
Array.isEmpty Array.empty
->True
Array.isEmpty (Array.repeat 2 x)
->False
Array.isEmpty (Array.initialize 2 f)
->False
I didn't mention the
Array.isEmpty (Array.initialize 2 f)
toFalse
(same for repeat) in the changelog nor documentation.At the moment, we get 2 errors when doing
Array.isEmpty (Array.fromList [])
. What do you think, is that a problem? I think it's okay, and I don't have a nice way around this. We'll have the same problem if we seerepeat 0
orrepeat 1
(or withinitialize
).Can be reviewed commit by commit.