Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created July 21, 2011 07:05
Show Gist options
  • Save yuroyoro/1096690 to your computer and use it in GitHub Desktop.
Save yuroyoro/1096690 to your computer and use it in GitHub Desktop.
object Pypi extends App {
val os = Seq("おっ", "オッ", "オッ", "O", "o")
val ps = Seq("Py", "py", "ぱい", "パイ", "パイ")
def choice[A](xs:Seq[A]):A = xs(util.Random.nextInt(xs.length))
def oppy = choice(os) * util.Random.nextInt(2) + choice(ps)
Stream.continually(oppy).flatten take(140) mkString
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment