You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
586 B

5 years ago
## range
### Instructions
Write the function `Range` which must:
5 years ago
- allocate (with make()) an array of integers.
- fill it with consecutive values that begin at `start` and end at `end` (Including `start` and `end` !)
- and that returns that array.
5 years ago
### Expected function
```go
func Range(start, end int) []int {
}
```
### Usage
5 years ago
- With (1, 3) you will return an array containing 1, 2 and 3.
- With (-1, 2) you will return an array containing -1, 0, 1 and 2.
- With (0, 0) you will return an array containing 0.
- With (0, -3) you will return an array containing 0, -1, -2 and -3.