parity function using list comprehension
+ Lab1Bonus up until foldr functions