mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added clearer example for lume.array()
in README
This commit is contained in:
parent
1942218390
commit
4fc4520a4c
@ -135,7 +135,7 @@ lume.sort({ 1, 3, 2 }, function(a, b) return a > b end) -- Returns { 3, 2, 1 }
|
|||||||
### lume.array(...)
|
### lume.array(...)
|
||||||
Iterates the supplied iterator and returns an array filled with the values.
|
Iterates the supplied iterator and returns an array filled with the values.
|
||||||
```lua
|
```lua
|
||||||
lume.array(pairs({a = 1, b = 2})) -- Returns {"a", "b"}
|
lume.array(string.gmatch("Hello world", "%a+")) -- Returns {"Hello", "world"}
|
||||||
```
|
```
|
||||||
|
|
||||||
### lume.each(t, fn, ...)
|
### lume.each(t, fn, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user