File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 81
81
import gleam/list
82
82
83
83
pub fn main() {
84
- let arr = [1, 46]
85
- let _ = 0 < list.length(arr )
86
- let _ = list.length(arr ) > 0
84
+ let numbers = [1, 46]
85
+ let _ = 0 < list.length(numbers )
86
+ let _ = list.length(numbers ) > 0
87
87
}
88
88
```
89
89
93
93
warning: Inefficient use of `list.length`
94
94
┌─ /data/data/com.termux/files/home/test_gleam/src/test_gleam.gleam:5:13
95
95
│
96
- 5 │ let _ = 0 < list.length(arr )
97
- │ ^^^^^^^^^^^^^^^^^^^^
96
+ 5 │ let _ = 0 < list.length(numbers )
97
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
98
98
99
99
The `list.length` function has to iterate across the whole
100
100
list to calculate the length, which is wasteful if you only
105
105
warning: Inefficient use of `list.length`
106
106
┌─ /data/data/com.termux/files/home/test_gleam/src/test_gleam.gleam:6:13
107
107
│
108
- 6 │ let _ = list.length(arr ) > 0
109
- │ ^^^^^^^^^^^^^^^^^^^^
108
+ 6 │ let _ = list.length(numbers ) > 0
109
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^
110
110
111
111
The `list.length` function has to iterate across the whole
112
112
list to calculate the length, which is wasteful if you only
You can’t perform that action at this time.
0 commit comments