I have a list like:
[[1,2,3,4,5],[6,7,8,9]]
I’m trying to do it using list comprehension and have got as far as:
each_in_lists x = [show y | y <- x]
where x is the list of lists.
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.
Are you trying to convert it to string
If you are trying to print, use
print.printuses the show instance of the elements to convert it to string and then usesputStrLn.