Skip to content

Commit

Permalink
feat(transducers): add labeled() xform
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jan 27, 2018
1 parent 931b67f commit 0b3c786
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/transducers/src/xform/labeled.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { Transducer } from "../api";
import { map } from "./map";

export function labeled<L, T>(id: L): Transducer<T, [L, T]> {
return map((x) => [id, x]);
}

0 comments on commit 0b3c786

Please sign in to comment.