mirror of https://github.com/01-edu/public.git
removing snake case
This commit is contained in:
parent
02a091c6f8
commit
78c54c2a26
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue