zip使ってmapcarもどき作る話。zipはreciever.zip(the_other)で二次元配列になる

kiyo_hikokiyo_hiko のブックマーク 2015/11/11 10:50

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

How do I implement Common Lisp's mapcar in Ruby?

    I want to implement Lisp's mapcar in Ruby. Wishful syntax: mul = -> (*args) { args.reduce(:*) } mapcar(mul, [1,2,3], [4,5], [6]) would yield [24, nil, nil]. Here is the solution I could think of: a...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう