From ea5893d0ae3e85148f1368240347aa096e7b7b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81=C4=99picki?= Date: Sat, 16 Sep 2023 10:29:49 +0200 Subject: [PATCH 1/2] Predefine do_insert instead of do_delete in erlang_extraction Because writing the insert function is the second task, I think it's more beneficial as a hint to predefine the private do_ function there so that beginners are not stuck on the different order of arguments. And then we can let the student figure this out on their own for the delete function --- .../concept/erlang-extraction/src/erlang_extraction.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/concept/erlang-extraction/src/erlang_extraction.gleam b/exercises/concept/erlang-extraction/src/erlang_extraction.gleam index beadcdfcd..e22a2966e 100644 --- a/exercises/concept/erlang-extraction/src/erlang_extraction.gleam +++ b/exercises/concept/erlang-extraction/src/erlang_extraction.gleam @@ -8,10 +8,10 @@ pub fn insert(tree: GbTree(k, v), key: k, value: v) -> GbTree(k, v) { todo } -pub fn delete(tree: GbTree(k, v), key: k) -> GbTree(k, v) { +fn do_insert(key: k, value: v, tree: GbTree(k, v)) -> GbTree(k, v) { todo } -fn do_delete(key: k, tree: GbTree(k, v)) -> GbTree(k, v) { +pub fn delete(tree: GbTree(k, v), key: k) -> GbTree(k, v) { todo } From 3cd18f67df4a4b7d624a89f364871d90dc31656c Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Mon, 18 Sep 2023 10:12:23 +0100 Subject: [PATCH 2/2] Remove extra private function --- .../concept/erlang-extraction/src/erlang_extraction.gleam | 4 ---- 1 file changed, 4 deletions(-) diff --git a/exercises/concept/erlang-extraction/src/erlang_extraction.gleam b/exercises/concept/erlang-extraction/src/erlang_extraction.gleam index e22a2966e..6519bca53 100644 --- a/exercises/concept/erlang-extraction/src/erlang_extraction.gleam +++ b/exercises/concept/erlang-extraction/src/erlang_extraction.gleam @@ -8,10 +8,6 @@ pub fn insert(tree: GbTree(k, v), key: k, value: v) -> GbTree(k, v) { todo } -fn do_insert(key: k, value: v, tree: GbTree(k, v)) -> GbTree(k, v) { - todo -} - pub fn delete(tree: GbTree(k, v), key: k) -> GbTree(k, v) { todo }