From 493375231a90ba7d9ba0f66b11cc0dcce6c4d6d2 Mon Sep 17 00:00:00 2001 From: estlop Date: Mon, 11 Jul 2022 18:29:34 +0100 Subject: [PATCH] docs: Write readme for byebyefirst subject --- byebyefirst/README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 byebyefirst/README.md diff --git a/byebyefirst/README.md b/byebyefirst/README.md new file mode 100644 index 00000000..0d503fb2 --- /dev/null +++ b/byebyefirst/README.md @@ -0,0 +1,35 @@ +## byebyefirst + +### Instructions + +Write a function that takes a slice of strings and returns a new slice without the first element. If the slice is empty, return the empty slice. + +### Expected function + +```go +func ByeByeFirst(strings []string) []string { +} +``` + +### Usage + +Here is a possible program to test your function : + +```go +package main + +func main() { + fmt.Println(ByeByeFirst([]string{})) + fmt.Println(ByeByeFirst([]string{"first", "second"})) + fmt.Println(ByeByeFirst([]string{"", "abcd", "efg"})) +} +``` + +And its output : + +```console +$ go run . | cat -e +[]$ +[second]$ +[abcd efg]$ +```