From 02a091c6f8ed3372e9a067e168f9863007b90616 Mon Sep 17 00:00:00 2001 From: lee Date: Fri, 11 Jun 2021 11:40:52 +0100 Subject: [PATCH] removing extra function --- subjects/listforeachif/README.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/subjects/listforeachif/README.md b/subjects/listforeachif/README.md index 00a258611..44a11da6d 100644 --- a/subjects/listforeachif/README.md +++ b/subjects/listforeachif/README.md @@ -35,17 +35,7 @@ func IsPositive_node(node *NodeL) bool { return false } -func IsNegative_node(node *NodeL) bool { - switch node.Data.(type) { - case int, float32, float64, byte: - return node.Data.(int) < 0 - case string, rune: - return false - } - return false -} - -func IsNotNumeric_node(node *NodeL) bool { +func IsAl_node(node *NodeL) bool { switch node.Data.(type) { case int, float32, float64, byte: return false @@ -105,7 +95,7 @@ func main() { fmt.Println("--------function applied--------") piscine.ListForEachIf(link, PrintElem, piscine.IsPositive_node) - piscine.ListForEachIf(link, StringToInt, piscine.IsNotNumeric_node) + piscine.ListForEachIf(link, StringToInt, piscine.IsAl_node) fmt.Println("--------function applied--------") PrintList(link)