Skip to content

Commit

Permalink
refactor(geom-subdiv-curve): update subdivide()
Browse files Browse the repository at this point in the history
- use mapcatIndexed() to simplify composed xform
  • Loading branch information
postspectacular committed Sep 18, 2020
1 parent 4f3d6e0 commit be79f2e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/geom-subdiv-curve/src/subdivide.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
comp,
indexed,
mapcat,
mapcatIndexed,
partition,
push,
transduce,
Expand All @@ -26,8 +25,7 @@ export const subdivide = (
pts = transduce<ReadonlyVec, ReadonlyVec, Vec[]>(
comp(
partition(size, 1),
indexed(),
mapcat(([i, pts]) => fn(pts, i, nump))
mapcatIndexed((i, pts) => fn(pts, i, nump))
),
push(),
pre ? pre(pts) : pts
Expand Down

0 comments on commit be79f2e

Please sign in to comment.