Browse Source

docs: Explain what to do when slice is empty or there are no even elements as per review

docs: remove piscine imports and refactor to remove variable as per review
pull/1327/head
estlop 2 years ago committed by Dav Hojt
parent
commit
5ab429e996
  1. 12
      subjects/evenlength/README.md

12
subjects/evenlength/README.md

@ -2,7 +2,7 @@
### Instructions ### Instructions
Write a function that receives a slice of strings and returns a new slice with the strings in which the length is even. Write a function that receives a slice of strings and returns a new slice with the strings in which the length is even. When the slice is empty or there are no even strings return an empty slice.
### Expected function ### Expected function
@ -17,13 +17,11 @@ Here is a possible program to test your function:
```go ```go
package main package main
import (
"piscine" import "fmt"
"fmt"
)
func main() { func main() {
l := piscine.EvenLength([]string{"Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"}) fmt.Println(EvenLength([]string{"Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"}))
fmt.Println(l)
} }
``` ```

Loading…
Cancel
Save