-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
let rec takewhile p = function%seq
| x::xs when p x -> x :: takewhile p xs
| _ -> []
let rec dropwhile p s = match%seq s with
| x::xs when p x -> dropwhile p xs
| xs -> xsbecomes
let rec takewhile p = fun s () -> match s () with
| Seq.Cons(x, xs) when p x -> Seq.Cons(x, takewhile p xs)
| _ -> Seq.NilHow do we deal with pattern nesting, or-patterns, etc..?
Metadata
Metadata
Assignees
Labels
No labels