tensort-1.0.0.0: Tunable sorting for responsive robustness and beyond
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Tensort.Utils.Check

Description

This module provides the isSorted function, which checks if a list of elements is sorted in ascending order.

Synopsis

Documentation

isSorted :: Sortable -> Bool Source #

Takes a Sortable list and returns True if the list is sorted in ascending order and False otherwise.

Examples

Expand
>>> isSorted (SortBit [0, 1, 2, 3, 4])
True
>>> isSorted (SortBit [0, 1, 2, 4, 3])
False