dimanche 19 juin 2022

Haskell - creating a string of 26 letters but randomized

I am new to Haskell (trying to self learn and write a semi complex program to familiarize myself) and trying to write a string generator that gives you a randomized alphabet without repeating the letters.

Example 1: "PLMOKNIJUHBVGYCTFDRXEZSWAQ" Example 2: "QAZWSXEDCRFVTGBYHNUJMIKOLP"

I am not really sure how to approach this since Haskell doesn't have loops, if this was in python, I'd understand how to implement this.

If anyone can show me how to implement this then I would greatly appreciate it.




Aucun commentaire:

Enregistrer un commentaire