std.array

A dynamically sized contigous sequence.

Values

let eq ?eq : forall a . [std.cmp.Eq a] -> std.cmp.Eq (Array a)

Eq a defines equality (==) on a

let ord ?ord : forall a . [std.cmp.Ord a] -> std.cmp.Ord (Array a)

Ord a defines an ordering on a

let show ?d : forall a . [std.show.Show a] -> std.show.Show (Array a)

Show a represents a conversion function from a to a readable string.

let functor : std.functor.Functor Array

A Functor represents an action on a parameterized type which does not change the structure with the mapped type.

The following laws should hold:

  • map id == id
  • map (f << g) == map f << map g

let foldable : std.foldable.Foldable Array

Operations over a data structure that can be folded which means that a functions gets called on each element to reduce the structure to a single value (Array, List and Map are all Foldable)

let traversable : std.traversable.Traversable Array

let semigroup : forall a . std.semigroup.Semigroup (Array a)

Semigroup a represents an associative operation on a. This means the following laws must hold:

  • forall x . append x (append y z) == append (append x y) z

let len : forall a . Array a -> Int

let index : forall a . Array a -> Int -> a

let append : forall a . Array a -> Array a -> Array a