Produces a sequence down to one. UpperLimit is included.
(upperLimit int)
| 1027 | |
| 1028 | // Produces a sequence down to one. UpperLimit is included. |
| 1029 | func seqOneTo(upperLimit int) []int { |
| 1030 | seq := make([]int, 0, upperLimit) |
| 1031 | |
| 1032 | for i := 1; i <= upperLimit; i++ { |
| 1033 | seq = append(seq, i) |
| 1034 | } |
| 1035 | |
| 1036 | return seq |
| 1037 | } |
| 1038 | |
| 1039 | func seqDownTo(upperLimit, lowerLimit int) []int { |
| 1040 | seq := make([]int, 0, upperLimit-lowerLimit+1) |
no outgoing calls
no test coverage detected
searching dependent graphs…