What are Alternative's “some” and “many” useful for?

后端 未结 5 2185
春和景丽
春和景丽 2020-12-01 07:31

Alternative, an extension of Applicative, declares empty, <|> and these two functions:

One or more:

5条回答
  •  Happy的楠姐
    2020-12-01 08:04

    In the STM Applicative, some would mean: Keep trying until it succeeds at least once, and then keep doing it until it fails. many would mean: Do this as many times as you can until failure.

提交回复
热议问题