GitBook brings all your technical knowledge together in a single, centralized knowledge base. So you can access and add to it in the tools you use every day — using code, text or even your voice.
![GitBook – Knowledge management for technical teams](https://cdn-ak-scissors.b.st-hatena.com/image/square/bb4309fa20b172921128eeaf995497739f87118a/height=288;version=1;width=512/https%3A%2F%2Fframerusercontent.com%2Fimages%2FUxZdLiGnpKZjqpMOu4WwSruo.png)
Rubyのメソッド引数は、デフォルト値がセットできたり、可変長引数にできたり、キーワード引数を渡せたり、多彩なわけですが。今日、tcoというターミナル出力に色を付けるライブラリのソースを眺めていたら、面白い引数の使い方に出会って。ちょっとこれ問題にしてみようかと。もしかしたら常識かもしれません。 ─ 問題1 ─ 配列を取り最初の3つの要素だけを返すメソッドfirst_threeを定義しなさい。具体的には、以下の挙動になる。 first_three 1 # => [1, nil, nil] first_three [1] # => [1, nil, nil] first_three [1, 2] # => [1, 2, nil] first_three [1, 2, 3, 4, 5] # => [1, 2, 3]
また1年振りの更新となりかけました。 Andres Raba氏により2011年から開発が続けられている、非公式PDF版SICPを全訳しました。 ファイル 恒例のgithubです。 https://github.com/minghai/sicp-pdf jsicp.pdfが日本語版の本体です。 ejsicp.pdfはデバッグ用の日本語・英語併記となります。 ライセンスはCC BY-NC-SA 3.0です。商業使用は認められないことにご注意下さい。 SICPとは何か? SICPとはMITが作成した何も知らない新入生向けのプログラミングの教科書です。 プログラミングと強調したことには理由があります。この本は良くあるプログラミング言語の教科書ではなく、あくまでもプログラミングを勉強するための教科書だからです。このことはこの本の中でも、最初の前書き、序文にて何度でも繰り返し強調されています。筆者達が
linuxwell 30 Mar 2014 Terminal colours made simple Over the weekend, I pushed out the first release of the tco gem. Its goal is to make working with terminal colours as simple as possible; hence the name tco. The main feature of this tool is the way it works with colours. Instead of an oddly organised sequence of colour codes, tco uses simple RGB. It provides a library for your Ruby gems and apps,
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く