File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,9 @@ module ParserMonad =
135
135
Ok ( Some a1, st)
136
136
else Ok ( None, st)
137
137
138
- let count ( length : int ) ( parser : ParserMonad < 'a >) : ParserMonad < 'a []> =
138
+ /// Repeats a given <see paramref="parser"/> <see paramref="length"/> times.
139
+ /// Fails with accumulated errors when any encountered.
140
+ let count ( length : int ) ( parser : ParserMonad < 'a >) : ParserMonad < 'a []> =
139
141
ParserMonad <| fun input state ->
140
142
let rec work ( i : int )
141
143
( st : State )
@@ -152,7 +154,6 @@ module ParserMonad =
152
154
work length state ( fun msg -> Error msg) ( fun st ac -> Ok ( ac, st))
153
155
|> Result.map ( fun ( ans , st ) -> ( List.toArray ans, st))
154
156
155
-
156
157
/// Drop a byte (word8)
157
158
let dropByte : ParserMonad < unit > =
158
159
checkedParseM " dropByte" <|
You can’t perform that action at this time.
0 commit comments