How to use Combinatorics.jl for permutations

I would like to gather all permutations of a certain number of elements of a set. I read that Combinatorics.jl can be used for that. However, I do not know how to use it. I do the following

using Combinatorics: permutations
p = permutations((-1, 1), 3)

and p is of the type Combinatorics.Permutations{Tuple{Int64, Int64}}. How am I supposed to probe this object to get my permutations?

Okay. You’re supposed to use collect:

using Combinatorics: permutations
p = permutations((1, 2, 3), 3);
perms = collect(p)

This will of course depend on what you are trying to do, but generally you’re not supposed to collect them - they are iterators, so you can loop over them without ever materialising the whole thing.