サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
デスク環境を整える
bendiken.net
A small collection of handy one-liners and useful snippets that I've written or collected for Ruby & Ruby on Rails. Sum & Product of an Array How to sum all the numbers in an array, or get the multiplication product of the same numbers, without resorting to an ugly for loop? Ruby's inject to the rescue; this snippet extends the array class with the methods sum and product, which can hereafter be u
このページを最初にブックマークしてみませんか?
『bendiken.net』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く