1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Ruby】配列をループしている合間に二重配列にしていく

Last updated at Posted at 2019-07-19

やろうとするたびに忘れるので,めも

sample.rb
#hogeはお好きなように
array.map{|word|[word,hoge]}
#array.map{|word|[word,hoge]} 冗長

ループしているうちに配列が前の方から次々と二重配列になっていく.
適宜,書き直してください.
他の処理も追加できます.
コードが汚いので,もっといい方法あったら教えてください.

1
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?