Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various typo fixes #69

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ M.select({1,2,3,4,5,6,7}, isOdd) -- => "{1,3,5,7}"
````

### reject (t, f)
*Aliases: `reject`*.
*Aliases: `discard`*.

Removes all values failing (returning false or nil) a validation test:

Expand Down Expand Up @@ -1780,7 +1780,7 @@ sqrt2() -- => 1.4142135623731
Binds a value to be the second argument to a function.

```lua
local last2 = M.bind(M.last,2)
local last2 = M.bind2(M.last,2)
last2({1,2,3,4,5,6}) -- => {5,6}
````

Expand Down Expand Up @@ -2225,8 +2225,8 @@ Curries a function. If the given function `f` takes multiple arguments, it retur
```lua
local function sumOf3args(x,y,z) return x + y + z end
local curried_sumOf3args = M.curry(sumOf3args, 3)
sumOf3args(1)(2)(3)) -- => 6
sumOf3args(0)(6)(9)) -- => 15
curried_sumOf3args(1)(2)(3) -- => 6
curried_sumOf3args(0)(6)(9) -- => 15
````

`n_args` defaults to 2.
Expand Down Expand Up @@ -2430,9 +2430,9 @@ The passed-in interceptor should be prototyped as `f(obj,...)`.
```lua
local v = M.chain({1,2,3,4,5,6,7,8,9,10})
:filter(function(v) return v%2~=0 end) -- retain odd values
:tap(function(v) print('Max is', M.max(v) end) -- Tap max value
:tap(function(v) print('Max is', M.max(v)) end) -- Tap max value
:map(function(v) return v^2 end)
:value() -- => Max is 89
:value() -- => Max is 81
````

### has (obj, key)
Expand All @@ -2448,7 +2448,7 @@ M.has(math,'random') -- => true
### pick (obj, ...)
*Aliases: `choose`*.

Collects whilelisted properties of a given object.
Collects whitelisted properties of a given object.

```lua
local object = {a = 1, b = 2, c = 3}
Expand Down
2 changes: 1 addition & 1 deletion moses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@ end
function M.converge(f, g, h) return function(...) return f(g(...),h(...)) end end

--- Partially apply a function by filling in any number of its arguments.
-- One may pass a string `'M'` as a placeholder in the list of arguments to specify an argument
-- One may pass a string `'_'` as a placeholder in the list of arguments to specify an argument
-- that should not be pre-filled, but left open to be supplied at call-time.
-- @name partial
-- @param f a function
Expand Down