mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
68db9fe0fe
Odd, I thought I added these before, but it's probably because I got in a mess with git and didn't re-add once I resolved that.
12 lines
327 B
Idris
12 lines
327 B
Idris
import Data.SortedMap
|
|
import Data.List
|
|
|
|
f : Ord k => SortedMap k v -> List (k, v)
|
|
f m = case sortBy (\(x, _), (y, _) => compare x y) (SortedMap.toList m) of
|
|
as => as
|
|
|
|
g : Ord k => SortedMap k v -> List (k, v)
|
|
g m = let kvs = toList m in
|
|
case sortBy (\(x, _), (y, _) => compare x y) kvs of
|
|
as => as
|