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

Data.Tensort.Subalgorithms.Bubblesort

Description

This module provides the bubblesort function for sorting Bit lists

Synopsis

Documentation

bubblesort :: Ord a => [a] -> [a] Source #

Takes a Bit and returns a sorted Bit using a Bubblesort algorithm.

Examples

Expand
>>> bubblesort ([16, 23, 4, 8, 15, 42] :: [Int])
[4,8,15,16,23,42]
>>> bubblesort ([(1, 16), (5, 23), (2, 4), (3, 8), (0, 15), (4, 42)] :: [(Int, Int)])
[(0,15),(1,16),(2,4),(3,8),(4,42),(5,23)]