Skip to content

Instantly share code, notes, and snippets.

@gkojax
Created July 8, 2012 01:47
Show Gist options
  • Select an option

  • Save gkojax/3068949 to your computer and use it in GitHub Desktop.

Select an option

Save gkojax/3068949 to your computer and use it in GitHub Desktop.
ランダムな数値のリスト
List(Random.nextInt(size), Random.nextInt(size), Random.nextInt(size))
// はもうちょっとかっこよくかける気がする。
List.fill(size)((Random.nextInt(_: Int))).map(_(size))
// https://twitter.com/halcat0x15a/status/221144191890231296
@gkojax

gkojax commented Jul 8, 2012

Copy link
Copy Markdown
Author

ありがとうございました。

http://tmblr.co/ZkKCZyOvRkXE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment