The ArrayQSortFn functor
Author: John Reppy
Keywords: Standard ML, SML, SML/NJ Library

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.6.1 (October 25, 2024)
Last updated 2024-10-25 16:47:18 UTC