package travesty

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Make0 makes an S0 from a Basic0.

Parameters

Signature

include Generic_types.S0 with type t := F.t with type elt := F.elt
include Filter_mappable_types.Generic with type 'a t := F.t and type 'a elt := F.elt

Generic strictly extends Generic_basic.

include Filter_mappable_types.Generic_basic with type 'a t := F.t with type 'a elt := F.elt

Generic_basic refers to the container type as 'a t, and the element type as 'a elt; substitute t/elt (arity-0) or 'a t/'a (arity-1) accordingly below.

include Generic_types.Generic with type 'a t := F.t with type 'a elt := F.elt
val filter_map : F.t -> f:(F.elt -> F.elt Base.option) -> F.t

filter_map c ~f maps f over every t in c, discarding any items for which f returns None.

val filter : F.t -> f:(F.elt -> Base.bool) -> F.t

filter c ~f checks f over every t in c, discarding any items for which f returns false.

val exclude : F.t -> f:(F.elt -> Base.bool) -> F.t

exclude c ~f checks f over every t in c, discarding any items for which f returns true.

We can also derive Mappable interfaces from filter-mappable ones, but leave that to a separate functor.

OCaml

Innovation. Community. Security.