Skip to content

Commit 0494222

Browse files
authored
Merge pull request #618 from fhagemann/allocations
Avoid allocations in `fmap`
2 parents 0b0e7e8 + dd288a8 commit 0494222

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)