Skip to content

Commit

Permalink
Swap function parameters for better readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
reczkok authored Jul 9, 2024
1 parent cae7b5f commit bb55010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wigsill/src/macro/repeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { WGSLCode, code } from '../wgslCode';
import { WGSLSegment } from './../types';

export function repeat(
snippet: string | WGSLSegment | ((idx: number) => string | WGSLSegment),
count: number,
snippet: string | WGSLSegment | ((idx: number) => string | WGSLSegment),
): WGSLCode {
if (typeof snippet === 'function') {
return code`${Array.from({ length: count }, (_, idx) => snippet(idx))}`;
Expand Down

0 comments on commit bb55010

Please sign in to comment.