Silly (silly v9000.9000.9000)

Documentation for Silly.

Link to this section Summary

Functions

A tuple containing both letters AND numbers

return true or false, at about equal probability

a domain, like "socks.edu" or "mustard.gov"

an email address, like michael-roundfortran-IfgB@cage.blook.af

a name and four alphanumeric characters, like "grizzle-beefshanks-A2dD"

Generate a random name, like "chastity truckagile"

Get a tuple containing all the names

You know, like "a", or "S", or "7"

Pull a random name out of the set

Pull a random thing out of the set

Just grab a word, at random

a word and three alphanumeric characters, like "spud-92D" or "fart-8dF"

Generate a random slug, like "chastity-truckagile"

raindrops on roses and whiskers on kittens bright copper kettles and warm woolen mittens brown paper packages tied up with strings this is a tuple just loaded with things when the dog bits or the bee stings or the dog bites a bee I think about some of my favorite things and bite the dog back

a tld, like "gov" or "mil", or "edu"

Link to this section Functions

A tuple containing both letters AND numbers

return true or false, at about equal probability

100 coin flips should contain both a true AND a false value

iex> Enum.member?(Enum.map(1..100, fn _ -> Silly.coin_toss() end), true)
true
iex> Enum.member?(Enum.map(1..100, fn _ -> Silly.coin_toss() end), false)
true

a domain, like "socks.edu" or "mustard.gov"

an email address, like michael-roundfortran-IfgB@cage.blook.af

a name and four alphanumeric characters, like "grizzle-beefshanks-A2dD"

Generate a random name, like "chastity truckagile"

Get a tuple containing all the names

Link to this function

random_alphanum()

You know, like "a", or "S", or "7"

Pull a random name out of the set

Examples

Test that we get a word from the list of words.

iex> Enum.member?(Tuple.to_list(Silly.names), Silly.random_name())
true

Pull a random thing out of the set

Examples

Test that we get a word from the list of words.

iex> Enum.member?(Tuple.to_list(Silly.things), Silly.random_thing())
true

Just grab a word, at random

a word and three alphanumeric characters, like "spud-92D" or "fart-8dF"

Generate a random slug, like "chastity-truckagile"

raindrops on roses and whiskers on kittens bright copper kettles and warm woolen mittens brown paper packages tied up with strings this is a tuple just loaded with things when the dog bits or the bee stings or the dog bites a bee I think about some of my favorite things and bite the dog back

a tld, like "gov" or "mil", or "edu"