Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 371 Bytes

File metadata and controls

19 lines (15 loc) · 371 Bytes

Stream.skip_while : ('a -> bool) -> 'a Stream.t -> 'a Stream.t

let unsubscribe = [|1; 2; 0; 3|]
  |> Stream.Async.of_array ~delay:2000
  |> Stream.skip_while (fun x -> x < 2)
  |> Stream.subscribe (fun x -> x |> string_of_int |> print_endline)

let _ = print_endline "pass"

(*
  > "pass"
  > 3
  > 4
  
  stream: _1_2_0_3__.
  output: ___2_0_3__.
*)