From 080a12cafeae32eccd16e3f9463482573a33b1d7 Mon Sep 17 00:00:00 2001 From: estlop Date: Thu, 23 Jun 2022 12:10:54 +0100 Subject: [PATCH] docs: Add description for oddlength --- subjects/oddlength/README.md | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 subjects/oddlength/README.md diff --git a/subjects/oddlength/README.md b/subjects/oddlength/README.md new file mode 100644 index 00000000..f7cfa36b --- /dev/null +++ b/subjects/oddlength/README.md @@ -0,0 +1,38 @@ +## oddlength + +### Instructions + +Write a function that receives a slice of strings and returns a new slice with the strings in which the length is odd. + +### Expected function + +```go +func Oddlength(strings []string) []string { + +} +``` + +### Usage + +Here is a possible program to test your function: + +```go +package main + +import ( + "piscine" + "fmt" +) + +func main() { + l := piscine.Oddlength(["Hi", "Hola", "Ola", "Ciao", "Salut", "Hallo"]) + fmt.Println(l) +} +``` + +And its output: + +```console +$ go run . +[Ola Salut Hallo] +```