Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created May 8, 2012 07:35
Show Gist options
  • Save rummelonp/2633303 to your computer and use it in GitHub Desktop.
Save rummelonp/2633303 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
lambda {|w, e, u, c, v|
c.times.map {
rand(v).times.map { w[rand(w.size)] }.join + e[rand(e.size)]
}.map.with_index {|t, o|
"#{u[o % u.size]}「#{t}」"
}.join
}.call %w{にゃ にゃあ にゃん}, %w{? ! ー 〜}, %w{ねこ ぬこ}, 5, 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment