Skip to content

Commit

Permalink
fix(transducers): str() initial result handling
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 17, 2018
1 parent eb67426 commit f001314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transducers/src/rfn/str.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export function str(sep?: string, xs?: Iterable<any>): any {
[...xs].join(sep) :
reducer<string, any>(
() => "",
(acc, x) => (acc = first ? "" + x : acc + sep + x, first = false, acc),
(acc, x) => (acc = first ? acc + x : acc + sep + x, first = false, acc),
);
}

0 comments on commit f001314

Please sign in to comment.