From 78c54c2a26e910d54c37d65146f2424a728773a2 Mon Sep 17 00:00:00 2001 From: lee Date: Fri, 11 Jun 2021 22:48:33 +0100 Subject: [PATCH] removing snake case --- subjects/listforeachif/README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/subjects/listforeachif/README.md b/subjects/listforeachif/README.md index 44a11da6..156c7b15 100644 --- a/subjects/listforeachif/README.md +++ b/subjects/listforeachif/README.md @@ -25,26 +25,25 @@ type List struct { Tail *NodeL } -func IsPositive_node(node *NodeL) bool { +func IsPositiveNode(node *NodeL) bool { switch node.Data.(type) { case int, float32, float64, byte: return node.Data.(int) > 0 - case string, rune: + default: return false } - return false } -func IsAl_node(node *NodeL) bool { +func IsAlNode(node *NodeL) bool { switch node.Data.(type) { case int, float32, float64, byte: return false - case string, rune: + default: return true } - return true } + func ListForEachIf(l *List, f func(*NodeL), cond func(*NodeL) bool) { } @@ -93,9 +92,9 @@ func main() { PrintList(link) fmt.Println("--------function applied--------") - piscine.ListForEachIf(link, PrintElem, piscine.IsPositive_node) + piscine.ListForEachIf(link, PrintElem, piscine.IsPositiveNode) - piscine.ListForEachIf(link, StringToInt, piscine.IsAl_node) + piscine.ListForEachIf(link, StringToInt, piscine.IsAlNode) fmt.Println("--------function applied--------") PrintList(link)