Reputation: 65
So I have a list A = [3,5,6,8,9] and list B = [1,2,..] infinite list
B remains same but A changes and in short I want to return a list C as True or False
-- x from a and y from b
if mod x y == 0:
then c = True
else False
So in the end the goal is to return a list c which tells if element at particular index is divisible by its index starting from 1.
Upvotes: 0
Views: 102
Reputation: 10645
It sounds like you just want zipWith (\x y -> x `mod` y == 0) a b
.
Upvotes: 1