Haskell: some and many [duplicate]
问题 This question already has answers here : What are Alternative's “some” and “many” useful for? (4 answers) Closed 12 months ago . What are some and many in Control.Applicative.Alternative good for? If I write something like some $ Just 42 , it seems to cause infinite recursion, which seems not very useful... 回答1: They make sense, when used as a parser combinator. some means, that the parser is applied as often as possible, but at least once. many is similar, but allows no parse. In case of