on master help sign in
Added the operations specified in the TODO in contrib/Data/SortedSet
dba8a5bSynthetica9
libs/contrib/Data/SortedMap.idr+1−2
@@ -238,10 +238,9 @@ toList (M _ t) = treeToList t
238treeMap : (a -> b) -> Tree n k a o -> Tree n k b o
238treeMap : (a -> b) -> Tree n k a o -> Tree n k b o
239treeMap f (Leaf k v) = Leaf k (f v)
239treeMap f (Leaf k v) = Leaf k (f v)
240treeMap f (Branch2 t1 k t2) = Branch2 (treeMap f t1) k (treeMap f t2)
240treeMap f (Branch2 t1 k t2) = Branch2 (treeMap f t1) k (treeMap f t2)
241−treeMap f (Branch3 t1 k1 t2 k2 t3)
241+treeMap f (Branch3 t1 k1 t2 k2 t3)
242 = Branch3 (treeMap f t1) k1 (treeMap f t2) k2 (treeMap f t3)
242 = Branch3 (treeMap f t1) k1 (treeMap f t2) k2 (treeMap f t3)
243
243
244implementation Functor (SortedMap k) where
244implementation Functor (SortedMap k) where
245 map _ Empty = Empty
245 map _ Empty = Empty
246 map f (M n t) = M _ (treeMap f t)
246 map f (M n t) = M _ (treeMap f t)
247−