From 82424c0cdbe85a409d0e583c11f07dba243276a2 Mon Sep 17 00:00:00 2001 From: estlop Date: Fri, 24 Jun 2022 10:20:16 +0100 Subject: [PATCH] docs: Add readme for popint subject --- subjects/popint/README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 subjects/popint/README.md diff --git a/subjects/popint/README.md b/subjects/popint/README.md new file mode 100644 index 00000000..8cbf7004 --- /dev/null +++ b/subjects/popint/README.md @@ -0,0 +1,39 @@ +## popint + +### Instructions + +Write a function that receives a slice of int and returns a new slice without the last element. + +### Expected function + +```go +func PopInt(ints []int) []int { + +} +``` + +### Usage + +Here is a possible program to test your function: + +```go +package main + +import ( + "piscine" + "fmt" +) + +func main() { + ints := {6,7,8,9,} + l := piscine.PopInt(ints) + fmt.Println(l) +} +``` + +And its output: + +```console +$ go run . +[6 7 8] +```