3 Some Familiar Data Structures in a Functional Setting ぱらぱらめくる『Purely Functional Data Structures』

module Heap (Heap(..))

where

class Heap h where

empty :: Ord a => h a
empty = undefined

isEmpty :: Ord a => h a -> Bool
isEmpty = undefined

insert :: Ord a => a -> h a -> h a
insert = undefined

merge :: Ord a => h a -> h a -> h a
merge = undefined

findMin :: Ord a => h a -> a
findMin = undefined

deleteMin :: Ord a => h a -> h a
deleteMin = undefined