Skip to content

Commit

Permalink
tacit and pointfree -> lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
richytong committed Apr 7, 2024
1 parent 1f96fcc commit b83101b
Show file tree
Hide file tree
Showing 59 changed files with 62 additions and 61 deletions.
4 changes: 2 additions & 2 deletions benchmarks/all.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico async array all', async () => {
])
})

suite.add('rubico async array all tacit', async () => {
suite.add('rubico async array all lazy', async () => {
await all([
async value => value + 1,
async value => value + 2,
Expand All @@ -27,7 +27,7 @@ suite.add('rubico async object all', async () => {
})
})

suite.add('rubico async object all tacit', async () => {
suite.add('rubico async object all lazy', async () => {
await all({
a: async value => value + 1,
b: async value => value + 2,
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico array all', () => {
])
})

suite.add('rubico array all tacit', () => {
suite.add('rubico array all lazy', () => {
all([
value => value + 1,
value => value + 2,
Expand All @@ -27,7 +27,7 @@ suite.add('rubico object all', () => {
})
})

suite.add('rubico object all tacit', () => {
suite.add('rubico object all lazy', () => {
all({
a: value => value + 1,
b: value => value + 2,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/and.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico and', async () => {
])
})

suite.add('rubico and tacit', async () => {
suite.add('rubico and lazy', async () => {
await and([
async value => value.a == 1,
async value => typeof value == 'object',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/and.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico and', () => {
])
})

suite.add('rubico and tacit', () => {
suite.add('rubico and lazy', () => {
and([
value => value.a == 1,
value => typeof value == 'object',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/assign.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico assign', async () => {
})
})

suite.add('rubico assign tacit', async () => {
suite.add('rubico assign lazy', async () => {
await assign({
a: async () => 1,
b: async () => 2,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico assign', () => {
})
})

suite.add('rubico assign tacit', () => {
suite.add('rubico assign lazy', () => {
assign({
a: () => 1,
b: () => 2,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/curry.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite.add('rubico curry', () => {
curry((a, b) => a + b, __, 1)(2)
})

suite.add('rubico curry tacit', () => {
suite.add('rubico curry lazy', () => {
curry((a, b) => a + b)(__, 1)(2)
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/every.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico every', async () => {
await every([1, 3, 5], async number => number % 2 == 1)
})

suite.add('rubico every tacit', async () => {
suite.add('rubico every lazy', async () => {
await every(async number => number % 2 == 1)([1, 3, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/every.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico every', () => {
every([1, 3, 5], number => number % 2 == 1)
})

suite.add('rubico every tacit', () => {
suite.add('rubico every lazy', () => {
every(number => number % 2 == 1)([1, 3, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/filter.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ suite.add('rubico filter', async () => {
await filter([1, 2, 3, 4, 5], async value => value % 2 == 1)
})

suite.add('rubico filter tacit', async () => {
suite.add('rubico filter lazy', async () => {
await filter(async value => value % 2 == 1)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico filter', () => {
filter([1, 2, 3, 4, 5], value => value % 2 == 1)
})

suite.add('rubico filter tacit', () => {
suite.add('rubico filter lazy', () => {
filter(value => value % 2 == 1)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/flatMap.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico flatMap', async () => {
await flatMap([1, 2, 3, 4, 5], async n => [n, n])
})

suite.add('rubico flatMap tacit', async () => {
suite.add('rubico flatMap lazy', async () => {
await flatMap(async n => [n, n])([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/flatMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico flatMap', () => {
flatMap([1, 2, 3, 4, 5], n => [n, n])
})

suite.add('rubico flatMap tacit', () => {
suite.add('rubico flatMap lazy', () => {
flatMap(n => [n, n])([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/get.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico get', async () => {
await get({}, 'a', async () => 1)
})

suite.add('rubico get tacit', async () => {
suite.add('rubico get lazy', async () => {
await get('a', async () => 1)({})
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite.add('rubico get', () => {
get({ a: 1 }, 'a')
})

suite.add('rubico get tacit', () => {
suite.add('rubico get lazy', () => {
get('a')({ a: 1 })
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/map.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite.add('rubico map', async () => {
await map([1, 2, 3, 4, 5], async value => value + 1)
})

suite.add('rubico map tacit', async () => {
suite.add('rubico map lazy', async () => {
await map(async value => value + 1)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ suite.add('rubico map', () => {
map([1, 2, 3, 4, 5], value => value + 1)
})

suite.add('rubico map tacit', () => {
suite.add('rubico map lazy', () => {
map(value => value + 1)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/not.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico not predicate', () => {
not({ a: 1 }, value => value.a == 1)
})

suite.add('rubico not predicate tacit', () => {
suite.add('rubico not predicate lazy', () => {
not(value => value.a == 1)({ a: 1 })
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/omit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico omit', () => {
omit({ a: 1, b: 2, c: 3 }, ['b', 'c'])
})

suite.add('rubico omit tacit', () => {
suite.add('rubico omit lazy', () => {
omit(['b', 'c'])({ a: 1, b: 2, c: 3 })
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/or.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico or', async () => {
])
})

suite.add('rubico or tacit', async () => {
suite.add('rubico or lazy', async () => {
await or([
async value => value.a == 2,
async value => typeof value == 'object',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/or.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico or', () => {
])
})

suite.add('rubico or tacit', () => {
suite.add('rubico or lazy', () => {
or([
value => value.a == 1,
value => typeof value == 'object',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pick.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico pick', () => {
pick({ a: 1, b: 2, c: 3 }, ['a'])
})

suite.add('rubico pick tacit', () => {
suite.add('rubico pick lazy', () => {
pick(['a'])({ a: 1, b: 2, c: 3 })
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pipe.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico pipe', async () => {
])
})

suite.add('rubico pipe tacit', async () => {
suite.add('rubico pipe lazy', async () => {
await pipe([
async n => n + 1,
async n => n * 2,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite.add('rubico pipe', () => {
])
})

suite.add('rubico pipe tacit', () => {
suite.add('rubico pipe lazy', () => {
pipe([
number => number + 1,
number => number + 2,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/reduce.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ suite.add('rubico reduce', async () => {
await reduce([1, 2, 3, 4, 5], async (a, b) => a + b, 0)
})

suite.add('rubico reduce tacit', async () => {
suite.add('rubico reduce lazy', async () => {
await reduce(async (a, b) => a + b, 0)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/reduce.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ suite.add('rubico reduce', () => {
reduce([1, 2, 3, 4, 5], (a, b) => a + b, 0)
})

suite.add('rubico reduce tacit', () => {
suite.add('rubico reduce lazy', () => {
reduce((a, b) => a + b, 0)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/set.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico set', async () => {
await set({}, 'a', async () => 1)
})

suite.add('rubico set tacit', async () => {
suite.add('rubico set lazy', async () => {
await set('a', async () => 1)({})
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite.add('rubico set', () => {
set({}, 'a', 1)
})

suite.add('rubico set tacit', () => {
suite.add('rubico set lazy', () => {
set('a', 1)({})
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/some.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico some', async () => {
await some([1, 3, 5], async number => number % 2 == 1)
})

suite.add('rubico some tacit', async () => {
suite.add('rubico some lazy', async () => {
await some(async number => number % 2 == 1)([1, 3, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/some.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ suite.add('rubico some', () => {
some([1, 2, 3, 4, 5], number => number % 2 == 1)
})

suite.add('rubico some tacit', () => {
suite.add('rubico some lazy', () => {
some(number => number % 2 == 1)([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/switchCase.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite.add('rubico switchCase', async () => {
])
})

suite.add('rubico switchCase tacit', async () => {
suite.add('rubico switchCase lazy', async () => {
await switchCase([
async s => s == 'hello',
async () => 'world',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/switchCase.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ suite.add('switchCase', () => {
])
})

suite.add('switchCase tacit', () => {
suite.add('switchCase lazy', () => {
switchCase([
number => number % 2 == 1,
'number is odd',
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/transform.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ suite.add('rubico transform', async () => {
)
})

suite.add('rubico transform tacit', async () => {
suite.add('rubico transform lazy', async () => {
await transform(
Transducer.map(async number => number ** 2),
[],
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ suite.add('rubico transform array -> array', () => {
transform([1, 2, 3, 4, 5], Transducer.map(number => number ** 2), [])
})

suite.add('rubico transform array -> array tacit', () => {
suite.add('rubico transform array -> array lazy', () => {
transform(Transducer.map(number => number ** 2), [])([1, 2, 3, 4, 5])
})

suite.add('rubico transform array -> string', () => {
transform([1, 2, 3, 4, 5], Transducer.map(number => number ** 2), '')
})

suite.add('rubico transform array -> string tacit', () => {
suite.add('rubico transform array -> string lazy', () => {
transform(Transducer.map(number => number ** 2), '')([1, 2, 3, 4, 5])
})

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tryCatch.async.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ suite.add('rubico tryCatch', async () => {
}, async error => error)
})

suite.add('rubico tryCatch tacit', async () => {
suite.add('rubico tryCatch lazy', async () => {
await tryCatch(async message => {
throw new Error(message)
}, async error => error)('hello')
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tryCatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ suite.add('rubico tryCatch', () => {
}, error => error)
})

suite.add('rubico tryCatch tacit', () => {
suite.add('rubico tryCatch lazy', () => {
tryCatch(message => {
throw new Error(message)
}, error => error)('hello')
Expand Down
2 changes: 1 addition & 1 deletion eq.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export = eq;
* }
* ```
*
* `eq` supports a tacit API for composability.
* `eq` supports a lazy API for composability.
*
* ```javascript [playground]
* pipe({ name: 'George' }, [
Expand Down
2 changes: 1 addition & 1 deletion every.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export = every;
* every(asyncNumbers(), async number => number < 6).then(console.log) // true
* ```
*
* `every` supports a tacit API for composability.
* `every` supports a lazy API for composability.
*
* ```javascript [playground]
* pipe([1, 2, 3], [
Expand Down
2 changes: 1 addition & 1 deletion every.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const _every = function (collection, predicate) {
* every(asyncNumbers(), async number => number < 6).then(console.log) // true
* ```
*
* `every` supports a tacit API for composability.
* `every` supports a lazy API for composability.
*
* ```javascript [playground]
* pipe([1, 2, 3], [
Expand Down
2 changes: 1 addition & 1 deletion get.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const _get = function (object, path, defaultValue) {
* console.log(get(obj, 'hello')) // world
* ```
*
* `get` supports a tacit API for composability
* `get` supports a lazy API for composability
*
* ```javascript [playground]
* const obj = { hello: 'world' }
Expand Down
2 changes: 1 addition & 1 deletion gt.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export = gt;
* console.log(isOfLegalAge(juvenile)) // false
* ```
*
* `gt` supports a tacit API for composability.
* `gt` supports a lazy API for composability.
*
* ```javascript [playground]
* pipe({ value: 1 }, [
Expand Down
Loading

0 comments on commit b83101b

Please sign in to comment.