History of Idiom 42 > diff from v14 to v15
Edit summary for version 15 :
↷
Version 14
2015-09-05, 08:40:42
Version 15
2015-09-05, 08:43:04
Idiom #42 Continue outer loop
Print each item v of list a which in not contained in list b.
For this, write an outer loop to iterate on a and an inner loop to iterate on b.
Idiom #42 Continue outer loop
Print each item v of list a which in not contained in list b.
For this, write an outer loop to iterate on a and an inner loop to iterate on b.
Code
sequence_ [ print v | v <- a, [ u | u <- b, u == v] == [] ]
Code
sequence_ [ print v | v <- a, [ u | u <- b, u == v] == [] ]
Comments bubble
a _\\ b abbreviates this task if you are not required to write your own printing iterations
Comments bubble
a _\\ nub b abbreviates this task if you are not required to write your own printing iterations