Browse Source

translation and fix

content-update
Christopher Fremond 5 years ago
parent
commit
cf33abd9d4
  1. 8
      subjects/compact.en.md
  2. 14
      subjects/compact.fr.md

8
subjects/compact.en.md

@ -1,12 +1,12 @@
## Compact
## compact
### Instructions
Write a function that will take a pointer to a array as parameter and overwrites any element that points to `nil`.
Write a function `Compact` that takes a pointer to an array as parameter and overwrites any element that points to `nil`.
- If you not sure what the function does. It exists in Ruby.
- Hint: This fonction exists in Ruby.
### Expected functions
### Expected function
```go
func Compact(ptr *[]string, length int) int {

14
subjects/compact.fr.md

@ -1,12 +1,12 @@
## Compact
## compact
### Instructions
Write a function that will take a pointer to a array as parameter and overwrites any element that points to `nil`.
Écrire une fonction `Compact` qui prend un pointeur sur tableau comme paramètre et qui réécris sur les éléments qui pointent sur `nil`.
- If you not sure what the function does. It exists in Ruby.
- Indice: Cette fonction existe in Ruby.
### Expected functions
### Fonction attendue
```go
func Compact(ptr *[]string, length int) int {
@ -14,9 +14,9 @@ func Compact(ptr *[]string, length int) int {
}
```
### Usage
### Utilisation
Here is a possible [program](TODO-LINK) to test your function :
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction :
```go
package main
@ -31,7 +31,7 @@ func main() {
}
```
And its output :
Et son résultat :
```console
student@ubuntu:~/piscine/test$ go build

Loading…
Cancel
Save