Skip to content

Commit e877610

Browse files
committed
Fix type stability in multiset_permutations
1 parent 6897953 commit e877610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/permutations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ julia> collect(multiset_permutations([1,1,2], 3))
287287
"""
288288
function multiset_permutations(a, t::Integer)
289289
m = unique(collect(a))
290-
f = [sum([c == x for c in a]) for x in m]
290+
f = [sum(c == x for c in a)::Int for x in m]
291291
multiset_permutations(m, f, t)
292292
end
293293

0 commit comments

Comments
 (0)