Skip to content

Commit dd288a8

Browse files
committed
Avoid allocations in fmap
1 parent 94ddeb7 commit dd288a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ratio(num, denom) = num/denom
77
modrange(x, r::AbstractUnitRange) = mod(x-first(r), length(r)) + first(r)
88
modrange(x, (l, u)::Tuple{Real,Real}) = mod(x-l, u-l+1) + l
99

10-
fmap(fs, x...) = _fmap(x, fs...)
10+
fmap(fs, x::Vararg{Any, N}) where {N} = _fmap(x, fs...)
1111
@inline _fmap(x, f, fs...) = (f(x...), _fmap(x, fs...)...)
1212
@inline _fmap(x) = ()
1313

0 commit comments

Comments
 (0)