package alba

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val find : (int -> bool) -> int -> int -> int

find p start beyond returns i with start <= i < beyond and p i or i = beyond if no index in the interval satisfies the predicate p.

val exist : (int -> bool) -> int -> int -> bool

exist p start beyond

Is there an index i satisfying p i within start <= i < beyond?

val forall : (int -> bool) -> int -> int -> bool

forall p start beyond

Do all indices i within start <= i < beyond satisfy p i?

val fold : 'a -> (int -> 'a -> 'a) -> int -> int -> 'a

fold a f start beyond starts with value a and folds the function f over the interval start..beyond.

fold a f start beyond =

   f (beyond - 1) (...  (f (start+1) (f start a))) 
module Monadic (M : Module_types.MONAD) : sig ... end
OCaml

Innovation. Community. Security.