News for hackers. Stuff that matters.
Re: by shhsshs on Monday May 22, 2023 @11:50PM (#36039593)

    const randomPermutation = arr => intSequence(0, arr.length - 1).map(i => arr[i])
    console.log(randomPermutation(['a', 'b', 'c'])
Re: by chriscavs on Tuesday May 23, 2023 @11:21AM (#36045593)
I believe sequence will accomplish what you're looking for here

const randomSeq = sequence([1,2,3]) // could return [3,1,2], [2,3,1], etc.