mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Updated README.md for changes in lume.fn()
This commit is contained in:
parent
4bb6f24213
commit
0c085ad5c1
@ -153,10 +153,12 @@ Returns a shallow copy of the table `t`.
|
|||||||
|
|
||||||
### lume.fn(fn, ...)
|
### lume.fn(fn, ...)
|
||||||
Creates a wrapper function around function `fn`, automatically inserting the
|
Creates a wrapper function around function `fn`, automatically inserting the
|
||||||
arguments into `fn` which will persist every time the wrapper is called.
|
arguments into `fn` which will persist every time the wrapper is called. Any
|
||||||
|
arguments which are passed to the returned function will be inserted after the
|
||||||
|
already existing arguments passed to `fn`.
|
||||||
```lua
|
```lua
|
||||||
local f = lume.fn(print, "Hello")
|
local f = lume.fn(print, "Hello")
|
||||||
f() -- Prints "Hello"
|
f("world") -- Prints "Hello world"
|
||||||
```
|
```
|
||||||
|
|
||||||
### lume.once(fn, ...)
|
### lume.once(fn, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user