Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created February 12, 2010 05:53
Show Gist options
  • Save yuroyoro/302343 to your computer and use it in GitHub Desktop.
Save yuroyoro/302343 to your computer and use it in GitHub Desktop.
def www( s:String ):String = {
import scala.util.Random
val rnd = new Random( )
val ws = List( "w","W","w" )
def w(n:Int):String = ( 0 - n) until rnd.nextInt(3) map { i => ws( rnd.nextInt( ws.size -1 ) ) } mkString
("ちょ" + w(1) + "おま" + w(1) ) + ("" /: s ){ ( c,e ) => c + e + w(0) } + w(0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment