mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jrosendo
a8cae3aa7c
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
byebyefirst
Instructions
Write a function that takes a slice of string
's and returns a new slice without the first element.
- If the slice is empty, return the empty slice.
Expected function
func ByeByeFirst(strings []string) []string {
}
Usage
Here is a possible program to test your function:
package main
import (
"fmt"
"piscine"
)
func main() {
fmt.Println(piscine.ByeByeFirst([]string{}))
fmt.Println(piscine.ByeByeFirst([]string{"one arg"}))
fmt.Println(piscine.ByeByeFirst([]string{"first", "second"}))
fmt.Println(piscine.ByeByeFirst([]string{"", "abcd", "efg"}))
}
And its output:
$ go run . | cat -e
[]$
[]$
[second]$
[abcd efg]$