StackOverflow 文件 Haskell Language 教程 排序演算法 選擇排序 選擇排序 Created: November-22, 2018 選擇排序重複選擇最小元素,直到列表為空。 import Data.List (minimum, delete) ssort::Ord t => [t] -> [t] ssort [] = [] ssort xs = let { x = minimum xs } in x : ssort (delete x xs) 氣泡排序