Do you think that it is OK to use map for an applying function to arguments list and ignore the results?
map(foo, bar)
It may appears as bug to person who is reading code.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you want the result using map is a perfectly fine way to apply a function to each item in a list, although many find it clearer to write it as a list comprehension or generator:
However if you don’t intend to use the result of the function call and are interested only in the side-effects then you should write using a procedural style instead: