Skip to content

Commit

Permalink
refactor(transducers): update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 20, 2021
1 parent a5a1b2d commit 924aa26
Show file tree
Hide file tree
Showing 22 changed files with 60 additions and 60 deletions.
6 changes: 3 additions & 3 deletions packages/transducers-binary/src/base64.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { $iter, iterator, iterator1 } from "@thi.ng/transducers/iterator";
import { compR } from "@thi.ng/transducers/compr";
import { iterator, iterator1, __iter } from "@thi.ng/transducers/iterator";
import { isReduced, reduced } from "@thi.ng/transducers/reduced";

const B64_CHARS =
Expand Down Expand Up @@ -67,7 +67,7 @@ export function base64Encode(
src: Iterable<number>
): string;
export function base64Encode(...args: any[]): any {
const iter = $iter(base64Encode, args, iterator);
const iter = __iter(base64Encode, args, iterator);
if (iter) {
return [...iter].join("");
}
Expand Down
6 changes: 3 additions & 3 deletions packages/transducers-binary/src/bits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { $iter, iterator } from "@thi.ng/transducers/iterator";
import { compR } from "@thi.ng/transducers/compr";
import { iterator, __iter } from "@thi.ng/transducers/iterator";
import { isReduced } from "@thi.ng/transducers/reduced";

/**
Expand Down Expand Up @@ -31,7 +31,7 @@ export function bits(
): IterableIterator<number>;
export function bits(...args: any[]): any {
return (
$iter(bits, args, iterator) ||
__iter(bits, args, iterator) ||
((rfn: Reducer<any, number>) => {
const reduce = rfn[2];
const size = args[0] || 8;
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-binary/src/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
import { unsupported } from "@thi.ng/errors/unsupported";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { iterator } from "@thi.ng/transducers/iterator";
import { mapcat } from "@thi.ng/transducers/mapcat";
import { reduce } from "@thi.ng/transducers/reduce";
import { mapcat } from "@thi.ng/transducers/xform/mapcat";
import type { BinStructItem } from "./api";
import { utf8Encode } from "./utf8";

Expand Down
14 changes: 7 additions & 7 deletions packages/transducers-binary/src/hex-dump.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { juxt } from "@thi.ng/compose/juxt";
import { U32, U8 } from "@thi.ng/hex";
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { $iter, iterator } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/xform/map";
import { mapIndexed } from "@thi.ng/transducers/xform/map-indexed";
import { padLast } from "@thi.ng/transducers/xform/pad-last";
import { partition } from "@thi.ng/transducers/xform/partition";
import { comp } from "@thi.ng/transducers/comp";
import { iterator, __iter } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/map";
import { mapIndexed } from "@thi.ng/transducers/map-indexed";
import { padLast } from "@thi.ng/transducers/pad-last";
import { partition } from "@thi.ng/transducers/partition";
import type { HexDumpOpts } from "./api";

/**
Expand Down Expand Up @@ -37,7 +37,7 @@ export function hexDump(
src: Iterable<number>
): IterableIterator<string>;
export function hexDump(...args: any[]): any {
const iter = $iter(hexDump, args, iterator);
const iter = __iter(hexDump, args, iterator);
if (iter) {
return iter;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/transducers-binary/src/partition-bits.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { $iter, iterator } from "@thi.ng/transducers/iterator";
import { iterator, __iter } from "@thi.ng/transducers/iterator";
import { isReduced } from "@thi.ng/transducers/reduced";

/**
Expand All @@ -23,7 +23,7 @@ export function partitionBits(
): IterableIterator<number>;
export function partitionBits(...args: any[]): any {
return (
$iter(partitionBits, args, iterator) ||
__iter(partitionBits, args, iterator) ||
((rfn: Reducer<any, number>) => {
const destSize = args[0];
const srcSize = args[1] || 8;
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-binary/src/random-bits.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IRandom } from "@thi.ng/random";
import { SYSTEM } from "@thi.ng/random/system";
import { repeatedly } from "@thi.ng/transducers/iter/repeatedly";
import { repeatedly } from "@thi.ng/transducers/repeatedly";

/**
* Returns an iterator of random bits, with 1's occurring w/ given
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-binary/src/utf8.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { iterator, iterator1 } from "@thi.ng/transducers/iterator";
import { isReduced } from "@thi.ng/transducers/reduced";

Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-fsm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Fn0, IObjectOf } from "@thi.ng/api";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { ensureReduced, isReduced } from "@thi.ng/transducers/reduced";

export interface FSMState {
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-hdom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@thi.ng/hdom";
import { derefContext } from "@thi.ng/hiccup/deref";
import type { Transducer } from "@thi.ng/transducers";
import { scan } from "@thi.ng/transducers/xform/scan";
import { scan } from "@thi.ng/transducers/scan";

/**
* Side-effecting & stateful transducer which receives {@link
Expand Down
14 changes: 7 additions & 7 deletions packages/transducers-stats/src/bollinger.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { $iter } from "@thi.ng/transducers/iterator";
import { drop } from "@thi.ng/transducers/xform/drop";
import { map } from "@thi.ng/transducers/xform/map";
import { multiplex } from "@thi.ng/transducers/xform/multiplex";
import { partition } from "@thi.ng/transducers/xform/partition";
import { comp } from "@thi.ng/transducers/comp";
import { drop } from "@thi.ng/transducers/drop";
import { __iter } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/map";
import { multiplex } from "@thi.ng/transducers/multiplex";
import { partition } from "@thi.ng/transducers/partition";
import { mse } from "./mse";
import { sma } from "./sma";

Expand Down Expand Up @@ -44,7 +44,7 @@ export function bollinger(
src: Iterable<number>
): IterableIterator<BollingerBand>;
export function bollinger(...args: any[]): any {
const iter = $iter(bollinger, args);
const iter = __iter(bollinger, args);
if (iter) {
return iter;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/transducers-stats/src/donchian.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { comp } from "@thi.ng/transducers/comp";
import { iterator } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/xform/map";
import { partition } from "@thi.ng/transducers/xform/partition";
import { map } from "@thi.ng/transducers/map";
import { partition } from "@thi.ng/transducers/partition";
import { bounds } from "./bounds";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-stats/src/ema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { iterator1 } from "@thi.ng/transducers/iterator";

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/transducers-stats/src/hma.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { comp } from "@thi.ng/transducers/comp";
import { drop } from "@thi.ng/transducers/drop";
import { iterator1 } from "@thi.ng/transducers/iterator";
import { drop } from "@thi.ng/transducers/xform/drop";
import { map } from "@thi.ng/transducers/xform/map";
import { multiplex } from "@thi.ng/transducers/xform/multiplex";
import { map } from "@thi.ng/transducers/map";
import { multiplex } from "@thi.ng/transducers/multiplex";
import { wma } from "./wma";

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/transducers-stats/src/macd.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { $iter } from "@thi.ng/transducers/iterator";
import { compR } from "@thi.ng/transducers/compr";
import { __iter } from "@thi.ng/transducers/iterator";
import { step } from "@thi.ng/transducers/step";
import { ema } from "./ema";

Expand Down Expand Up @@ -54,7 +54,7 @@ export function macd(
): IterableIterator<MACD>;
export function macd(...args: any[]): any {
return (
$iter(macd, args) ||
__iter(macd, args) ||
((rfn: Reducer<any, MACD>) => {
const reduce = rfn[2];
const maFast = step(ema(args[0] || 12));
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-stats/src/momentum.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DCons } from "@thi.ng/dcons/dcons";
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { iterator1 } from "@thi.ng/transducers/iterator";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-stats/src/roc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DCons } from "@thi.ng/dcons/dcons";
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { iterator1 } from "@thi.ng/transducers/iterator";

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/transducers-stats/src/rsi.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { comp } from "@thi.ng/transducers/comp";
import { drop } from "@thi.ng/transducers/drop";
import { iterator1 } from "@thi.ng/transducers/iterator";
import { drop } from "@thi.ng/transducers/xform/drop";
import { map } from "@thi.ng/transducers/xform/map";
import { multiplex } from "@thi.ng/transducers/xform/multiplex";
import { map } from "@thi.ng/transducers/map";
import { multiplex } from "@thi.ng/transducers/multiplex";
import { momentum } from "./momentum";
import { sma } from "./sma";

Expand Down
14 changes: 7 additions & 7 deletions packages/transducers-stats/src/sd.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { $iter } from "@thi.ng/transducers/iterator";
import { drop } from "@thi.ng/transducers/xform/drop";
import { map } from "@thi.ng/transducers/xform/map";
import { multiplex } from "@thi.ng/transducers/xform/multiplex";
import { partition } from "@thi.ng/transducers/xform/partition";
import { comp } from "@thi.ng/transducers/comp";
import { drop } from "@thi.ng/transducers/drop";
import { __iter } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/map";
import { multiplex } from "@thi.ng/transducers/multiplex";
import { partition } from "@thi.ng/transducers/partition";
import { mse } from "./mse";
import { sma } from "./sma";

Expand All @@ -29,7 +29,7 @@ export function sd(
src: Iterable<number>
): IterableIterator<number>;
export function sd(...args: any[]): any {
const iter = $iter(sd, args);
const iter = __iter(sd, args);
if (iter) {
return iter;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-stats/src/sma.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DCons } from "@thi.ng/dcons/dcons";
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { compR } from "@thi.ng/transducers/compr";
import { iterator1 } from "@thi.ng/transducers/iterator";

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/transducers-stats/src/stochastic.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Reducer, Transducer } from "@thi.ng/transducers";
import { compR } from "@thi.ng/transducers/func/compr";
import { $iter } from "@thi.ng/transducers/iterator";
import { compR } from "@thi.ng/transducers/compr";
import { __iter } from "@thi.ng/transducers/iterator";
import { step } from "@thi.ng/transducers/step";
import { donchian } from "./donchian";
import { sma } from "./sma";
Expand Down Expand Up @@ -38,7 +38,7 @@ export function stochastic(
): IterableIterator<Stochastic>;
export function stochastic(...args: any[]): any {
return (
$iter(stochastic, args) ||
__iter(stochastic, args) ||
((rfn: Reducer<any, Stochastic>) => {
const reduce = rfn[2];
const xfD = step(donchian(args[0] || 5));
Expand Down
2 changes: 1 addition & 1 deletion packages/transducers-stats/src/trix.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { comp } from "@thi.ng/transducers/comp";
import { iterator1 } from "@thi.ng/transducers/iterator";
import { ema } from "./ema";
import { roc } from "./roc";
Expand Down
8 changes: 4 additions & 4 deletions packages/transducers-stats/src/wma.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { isNumber } from "@thi.ng/checks/is-number";
import type { Transducer } from "@thi.ng/transducers";
import { comp } from "@thi.ng/transducers/func/comp";
import { range } from "@thi.ng/transducers/iter/range";
import { comp } from "@thi.ng/transducers/comp";
import { iterator1 } from "@thi.ng/transducers/iterator";
import { map } from "@thi.ng/transducers/xform/map";
import { partition } from "@thi.ng/transducers/xform/partition";
import { map } from "@thi.ng/transducers/map";
import { partition } from "@thi.ng/transducers/partition";
import { range } from "@thi.ng/transducers/range";
import { dot } from "./dot";

/**
Expand Down

0 comments on commit 924aa26

Please sign in to comment.