The SML of NJ Library
The `ArrayQSortFn` functor

The `ArrayQSortFn` functor provides in situ sorting of monomorphic arrays using the quicksort algorithm.

## Synopsis

    signature MONO_ARRAY_SORT
    functor ArrayQSortFn (A : MONO_ARRAY) : MONO_ARRAY_SORT

## Functor Argument Interface

    A : MONO_ARRAY

## Functor Argument Description

`A : MONO_ARRAY`

  A structure that implements the `MONO_ARRAY` signature from the SML Basis Library.

## Interface

    structure A : MONO_ARRAY

    val sort : (A.elem * A.elem -> order) -> A.array -> unit

    val sorted : (A.elem * A.elem -> order) -> A.array -> bool

## Interface Description

`structure A : MONO_ARRAY`

  The argument structure.

`val sort : (A.elem * A.elem -> order) -> A.array -> unit`

  `sort cmp arr` sorts the array `arr` into ascending order according to the comparison function `cmp`.

`val sorted : (A.elem * A.elem -> order) -> A.array -> bool`

  `sorted cmp arr` returns true if, and only if, the array `arr=` is sorted in ascending order.

## See Also

`ArrayQSort`, `MONO_ARRAY`, `MonoArrayFn`, The Util Library

SML/NJ Version 110.99.3 (August 1, 2023)
Last updated 2023-07-31 17:59:01 UTC