Updated README.md for changes in lume.fn()

This commit is contained in:
rxi 2014-03-03 13:34:27 +00:00
parent 4bb6f24213
commit 0c085ad5c1

View File

@ -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, ...)