Skip to content

Commit

Permalink
Use do notation in some
Browse files Browse the repository at this point in the history
  • Loading branch information
rvs314 authored and gallais committed Oct 19, 2023
1 parent 6c35157 commit f694e5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/contrib/Data/String/Parser.idr
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ mutual
export
covering
some : Monad m => ParseT m a -> ParseT m (List a)
some p = [| p :: many p |]
some p = do r <- p
rs <- many p
pure $ r :: rs

||| Always succeeds, will accumulate the results of `p` in a list until it fails.
export
Expand Down

0 comments on commit f694e5e

Please sign in to comment.