mirror of https://github.com/01-edu/public.git
docs: Explain what to do when slice is empty or there are no odd elements as per review
docs: Remove piscine imports and refactor as per review
This commit is contained in:
parent
6468a3614b
commit
042298332e
|
@ -2,7 +2,7 @@
|
|||
|
||||
### Instructions
|
||||
|
||||
Write a function that receives a slice of strings and returns a new slice with the strings in which the length is odd.
|
||||
Write a function that receives a slice of strings and returns a new slice with the strings in which the length is odd. When the slice is empty or there are no odd strings return an empty slice.
|
||||
|
||||
### Expected function
|
||||
|
||||
|
@ -19,14 +19,10 @@ Here is a possible program to test your function:
|
|||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"piscine"
|
||||
"fmt"
|
||||
)
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
l := piscine.Oddlength(["Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"])
|
||||
fmt.Println(l)
|
||||
fmt.Println(Oddlength(["Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"]))
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue