Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

TbpgrUtils | 追加要件 Array#together_compact, Array#together_compact!を追加

概要

Array#together_compact, Array#together_compact!を追加

詳細

Array#together_compact, Array#together_compact!を追加します

仕様

・Array#compact, ・Array#compact!のtogether版。
・together_compact はN個の配列をもつ配列に対して、各配列内のnilを除去する。immutable版であり、元のリストには変更を加えない。
・together_compact! はN個の配列をもつ配列に対して、各配列内のnilを除去する。mutable版であり、元のリストに対して変更を加える。
・together_compactは以下のaliasを持つ
tcompact
・together_compact!は以下のaliasを持つ
tcompact!

※より詳細についてはGitHubのREADMEおよびテストケース参照

リリースバージョン

0.0.22