Skip to content

Instantly share code, notes, and snippets.

@hodzanassredin
Created April 6, 2011 17:03
Show Gist options
  • Save hodzanassredin/906051 to your computer and use it in GitHub Desktop.
Save hodzanassredin/906051 to your computer and use it in GitHub Desktop.
words generator via list comprehensions
let words numOfChars alphabet = []:[ b++[c] | numOfChars > 0, b <-words (numOfChars-1) alphabet, c <- alphabet ]
words 3 "ab"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment