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