Basics.LIST
val split_at_first :
('a -> bool) ->
prefix:[ `Rev | `Same ] ->
where:[ `After | `Around | `Before ] ->
'a list ->
('a list * 'a list, unit) Stdlib.result
split_at_first ~prefix ~where p list
splits list
right after, right before, or around the first element e
that satisfies p e
.
prefix
indicates whether or not to keep the prefix in revered order, and where
instructs where to split (`Around
discards the element).