package feat

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

This module provides an abstract data type of implicit, finite sequences. An implicit sequence is not explicitly represented in memory as an actual sequence of elements: instead, it is described by a data structure which contains enough information to produce an arbitrary element upon request. This design decision imposes some constraints on the operations that can be efficiently supported: for instance, filter is not supported.

include FeatCore.IFSeqSig.IFSEQ_EXTENDED with type index = Feat.Num.t
type 'a seq
val empty : 'a seq
val zero : 'a seq
val singleton : 'a -> 'a seq
val one : 'a -> 'a seq
val rev : 'a seq -> 'a seq
val sum : 'a seq -> 'a seq -> 'a seq
val (++) : 'a seq -> 'a seq -> 'a seq
val product : 'a seq -> 'b seq -> ('a * 'b) seq
val (**) : 'a seq -> 'b seq -> ('a * 'b) seq
val map : ('a -> 'b) -> 'a seq -> 'b seq
val up : int -> int -> int seq
type index = Num.t
val length : 'a seq -> index
val get : 'a seq -> index -> 'a
val foreach : 'a seq -> ('a -> unit) -> unit
val to_seq : 'a seq -> 'a Stdlib.Seq.t -> 'a Stdlib.Seq.t
val bigsum : 'a seq list -> 'a seq
val exists : 'a list -> ('a -> 'b seq) -> 'b seq
val sample : int -> 'a seq -> 'a Stdlib.Seq.t -> 'a Stdlib.Seq.t
OCaml

Innovation. Community. Security.