Permutations: Difference between revisions

m
Line 3,483:
 
=={{header|Julia}}==
Julia has support for permutation creation and processing via the <tt>Combinatorics</tt> package. <tt>permutations(v)</tt> creates an iterator over all permutations of <tt>v</tt>. Julia 0.7 and 1.0+ require the line global i inside the for to update the i variable.
<lang Julia>
using Combinatorics
Line 3,492:
print("All the permutations of ", term, " (", pcnt, "):\n ")
for p in permutations(split(term, ""))
global i
print(join(p), " ")
i += 1