aboutsummaryrefslogtreecommitdiff
path: root/aoc-2020-gleam/src/ext/mapx.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'aoc-2020-gleam/src/ext/mapx.gleam')
-rw-r--r--aoc-2020-gleam/src/ext/mapx.gleam16
1 files changed, 0 insertions, 16 deletions
diff --git a/aoc-2020-gleam/src/ext/mapx.gleam b/aoc-2020-gleam/src/ext/mapx.gleam
deleted file mode 100644
index 244c1ac..0000000
--- a/aoc-2020-gleam/src/ext/mapx.gleam
+++ /dev/null
@@ -1,16 +0,0 @@
-import gleam/map.{Map}
-import gleam/iterator.{Iterator} as iter
-
-pub fn from_iter(iterator: Iterator(#(k, v))) -> Map(k, v) {
- iter.fold(
- over: iterator,
- from: map.new(),
- with: fn(acc, cur) { map.insert(acc, cur.0, cur.1) },
- )
-}
-
-pub fn to_iter(map: Map(k, v)) -> Iterator(#(k, v)) {
- map
- |> map.to_list
- |> iter.from_list
-}