Hoogle Search
Within LTS Haskell 24.33 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
robustsortRP :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Recursive Mundane Robustsort algorithm with a Permutationsort adjudicator
Examples
>>> robustsortRP ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortRP ([(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)]
module Data.Tensort.Subalgorithms.
Bogosort This module provides the bogosort function for sorting lists
bogosort :: Ord a => [a] -> [a]tensort Data.Tensort.Subalgorithms.Bogosort Takes a list and returns a sorted list using a Bogosort algorithm.
Examples
>>> bogosort ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> bogosort ([(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)]
bogosortSeeded :: Ord a => Int -> [a] -> [a]tensort Data.Tensort.Subalgorithms.Bogosort Takes a seed for use in random generation and a list and returns a sorted list using a Bogosort algorithm.
Examples
>>> bogosortSeeded 42 ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> bogosortSeeded 24 ([(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)]
module Data.Tensort.Subalgorithms.
Bubblesort This module provides the bubblesort function for sorting Bit lists
bubblesort :: Ord a => [a] -> [a]tensort Data.Tensort.Subalgorithms.Bubblesort Takes a Bit and returns a sorted Bit using a Bubblesort algorithm.
Examples
>>> 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)]
module Data.Tensort.Subalgorithms.
Exchangesort This module provides the exchangesort function for sorting lists
exchangesort :: Ord a => [a] -> [a]tensort Data.Tensort.Subalgorithms.Exchangesort Takes a list and returns a sorted list using an Exchangesort algorithm.
Examples
>>> exchangesort ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> exchangesort ([(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)]
module Data.Tensort.Subalgorithms.
Magicsort This module provides the magicsort function for sorting lists
magicsort :: Ord a => [a] -> [a]tensort Data.Tensort.Subalgorithms.Magicsort Takes a list and returns a sorted list. Runs both Permutationsort and Bogosort on the input list and compares the results. If the results agree, returns the result of Permutationsort, otherwise repeats the process.
Examples
>>> magicsort ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> magicsort ([(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)]