The Biocaml Library : Biocaml_internal_pervasives.Array

struct
include Core.Std.Array

let to_stream a =
Stream.from (fun i ->
try Some a.(i)
with Invalid_argument _ -> None
)

let of_stream strm = List.of_stream strm |! Array.of_list

let range xs = Stream.Infix.(0 --^ (length xs))
end

AltStyle によって変換されたページ (->オリジナル) /