|
|
@ -86,7 +86,7 @@ func PrintList(l *piscine.List) { |
|
|
|
fmt.Print(it.Data, "->") |
|
|
|
fmt.Print(it.Data, "->") |
|
|
|
it = it.Next |
|
|
|
it = it.Next |
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println() |
|
|
|
fmt.Print("nil","\n") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
func main() { |
|
|
@ -120,12 +120,15 @@ And its output : |
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/piscine-go/test$ go build |
|
|
|
student@ubuntu:~/piscine-go/test$ go build |
|
|
|
student@ubuntu:~/piscine-go/test$ ./test |
|
|
|
student@ubuntu:~/piscine-go/test$ ./test |
|
|
|
1 -> hello -> 3 -> there -> 23 -> ! -> 54 -> <nil> |
|
|
|
1->hello->3->there->23->!->54->nil |
|
|
|
--------function applied-------- |
|
|
|
--------function applied-------- |
|
|
|
hello |
|
|
|
1 |
|
|
|
there |
|
|
|
3 |
|
|
|
! |
|
|
|
23 |
|
|
|
|
|
|
|
54 |
|
|
|
--------function applied-------- |
|
|
|
--------function applied-------- |
|
|
|
1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 -> <nil> |
|
|
|
1->2->3->2->23->2->54->nil |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
student@ubuntu:~/piscine-go/test$ |
|
|
|
student@ubuntu:~/piscine-go/test$ |
|
|
|
student@ubuntu:~/piscine-go/test$ |
|
|
|
``` |
|
|
|
``` |
|
|
|