Is it possible to have a condition in a map function?
For example :
map (> 0 < 100 )[1..10]
If it’s not possible, how could one achieve this?
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.
Not quite like that, I presume you are trying to get a boolean indicating whether the value is greater than 0 and less than 100? You have several options:
You can name a function
You can use a lambda
You can use
Data.Ixand theinRangefunction