From 3d0970ca7f8c206aeb1c243a7960162e930e5dfc Mon Sep 17 00:00:00 2001 From: lee Date: Fri, 6 Sep 2019 11:44:20 +0100 Subject: [PATCH] fix output given to the student --- subjects/listforeachif.en.md | 15 +++++++++------ subjects/listforeachif.fr.md | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/subjects/listforeachif.en.md b/subjects/listforeachif.en.md index 497e3dc29..253c968bc 100644 --- a/subjects/listforeachif.en.md +++ b/subjects/listforeachif.en.md @@ -86,7 +86,7 @@ func PrintList(l *piscine.List) { fmt.Print(it.Data, "->") it = it.Next } - fmt.Println() + fmt.Print("nil","\n") } func main() { @@ -120,12 +120,15 @@ And its output : ```console student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ ./test -1 -> hello -> 3 -> there -> 23 -> ! -> 54 -> +1->hello->3->there->23->!->54->nil + --------function applied-------- -hello -there -! +1 +3 +23 +54 --------function applied-------- -1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 -> +1->2->3->2->23->2->54->nil + student@ubuntu:~/piscine/test$ ``` diff --git a/subjects/listforeachif.fr.md b/subjects/listforeachif.fr.md index c0f6be181..0c2a0eb23 100644 --- a/subjects/listforeachif.fr.md +++ b/subjects/listforeachif.fr.md @@ -86,7 +86,7 @@ func PrintList(l *piscine.List) { fmt.Print(it.Data, "->") it = it.Next } - fmt.Println() + fmt.Print("nil","\n") } func main() { @@ -120,12 +120,15 @@ Et son résultat : ```console student@ubuntu:~/piscine/test$ go build student@ubuntu:~/piscine/test$ ./test -1 -> hello -> 3 -> there -> 23 -> ! -> 54 -> +1->hello->3->there->23->!->54->nil + --------function applied-------- -hello -there -! +1 +3 +23 +54 --------function applied-------- -1 -> 1 -> 3 -> 1 -> 23 -> 1 -> 54 -> +1->2->3->2->23->2->54->nil + student@ubuntu:~/piscine/test$ ```