updated permutation examples

remove Array.isArray check