Skip to content

Commit 95592bc

Browse files
feat(website): recipes updates (#51)
1 parent cc33c97 commit 95592bc

File tree

3 files changed

+144
-75
lines changed

3 files changed

+144
-75
lines changed

src/operations/collections.d.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const toSet: <Value>() => Reducer<Value, Set<Value>>
6969
* pipe(
7070
* cycle([`sloth`, `lazy`, `sleep`]),
7171
* take(4),
72-
* map(string => ({ sloth: string })),
72+
* map(word => ({ sloth: word })),
7373
* reduce(toWeakSet()),
7474
* ),
7575
* )
@@ -96,7 +96,7 @@ export const toWeakSet: <Value extends object>() => Reducer<
9696
* console.log(
9797
* pipe(
9898
* [`sloth`, `lazy`, `sleep`],
99-
* map(string => [string, string.length]),
99+
* map(word => [word, word.length]),
100100
* reduce(toObject()),
101101
* ),
102102
* )
@@ -128,7 +128,7 @@ export const toObject: <Key extends keyof never, Value>() => RawKeyedReducer<
128128
* console.log(
129129
* pipe(
130130
* [`sloth`, `lazy`, `sleep`],
131-
* map(string => [string, string.length]),
131+
* map(word => [word, word.length]),
132132
* reduce(toMap()),
133133
* ),
134134
* )
@@ -160,7 +160,7 @@ export const toMap: <Key, Value>() => RawKeyedReducer<
160160
* console.log(
161161
* pipe(
162162
* [`sloth`, `lazy`, `sleep`],
163-
* map(string => [{ sloth: string }, string.length]),
163+
* map(word => [{ sloth: word }, word.length]),
164164
* reduce(toWeakMap()),
165165
* ),
166166
* )
@@ -187,7 +187,7 @@ export const toWeakMap: <Key extends object, Value>() => RawKeyedReducer<
187187
* console.log(
188188
* pipe(
189189
* [`sloth`, `lazy`, `sleep`],
190-
* map(string => [string.length, string]),
190+
* map(word => [word.length, word]),
191191
* reduce(toGrouped(toArray(), toMap())),
192192
* ),
193193
* )
@@ -283,7 +283,7 @@ export const toGrouped: {
283283
* console.log(
284284
* pipe(
285285
* [`sloth`, `lazy`, `sleep`],
286-
* map(string => string.length),
286+
* map(word => word.length),
287287
* reduce(toMultiple([toSet(), toCount(), toJoin(`,`)])),
288288
* ),
289289
* )
@@ -296,7 +296,7 @@ export const toGrouped: {
296296
* console.log(
297297
* pipe(
298298
* [`sloth`, `lazy`, `sleep`],
299-
* map(string => string.length),
299+
* map(word => word.length),
300300
* reduce(
301301
* toMultiple({
302302
* set: toSet(),
@@ -407,7 +407,7 @@ export const toMultiple: {
407407
* console.log(
408408
* pipe(
409409
* [`sloth`, `lazy`, `sleep`],
410-
* map(string => [string.length, string]),
410+
* map(word => [word.length, word]),
411411
* reduce(toGrouped(toJoin(`,`), toMap())),
412412
* ),
413413
* )
@@ -436,7 +436,7 @@ export const toJoin: (separator: string) => Reducer<unknown, unknown, string>
436436
* console.log(
437437
* pipe(
438438
* [`sloth`, `lazy`, `sleep`],
439-
* map(string => string.toUpperCase()),
439+
* map(word => word.toUpperCase()),
440440
* join(`, `),
441441
* ),
442442
* )

src/operations/core.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const curry: <Parameters extends readonly any[], Return>(
6868
* console.log(
6969
* pipe(
7070
* [`sloth`, `lazy`, `sleep`],
71-
* map(string => string.toUpperCase()),
71+
* map(word => word.toUpperCase()),
7272
* reduce(toArray()),
7373
* // Also works with non-`lfi` functions!
7474
* array => array.sort(),
@@ -158,7 +158,7 @@ export const pipe: {
158158
* import { compose, map, reduce, toArray } from 'lfi'
159159
*
160160
* const screamify = compose(
161-
* map(string => string.toUpperCase()),
161+
* map(word => word.toUpperCase()),
162162
* reduce(toArray()),
163163
* // Also works with non-`lfi` functions!
164164
* array => array.sort(),

0 commit comments

Comments
 (0)