Skip to content

Commit

Permalink
optimze mapv
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Dec 2, 2024
1 parent 2515d55 commit 271cc75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/squint/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,10 @@ export function vector_QMARK_(x) {
}

export function mapv(...args) {
if (args.length === 2) {
const [f, coll] = args;
return into([], map(f), coll);
}
return [...map(...args)];
}

Expand Down

0 comments on commit 271cc75

Please sign in to comment.