If Bind is fundamental to monads, how come we don’t use more SelectMany in Linq?
(Sorry, can’t think of anything useful to add to the question)
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.
Well,
SelectManyis crucial in that many other things can be expressed that way – but that doesn’t mean it’s always the most concise way of expressing it. You can think ofSelect,Whereand so on as merely convenience methods… but ones which are so convenient that we often don’t need the most flexible form.To give another example,
Aggregatecan perform all the aggregation you want – butMax,Countetc are far more common.