PUZZLE TIME how would you implement in ruby a method that takes ["a", "b", "a", "c", "c"] and returns {"a" => 2, "b" => 1, "c" => 2} ?
@coreyhaines yeah that was my original answer actually, but i wasn't crazy about the block-yielding-the-thing part!
-
-
@carols10cents ->x{x} is so funny. An identity function, but nobody likes it. (me neither) :) -
@coreyhaines@Carols10cents when I want my blocks to be more intention revealing I name them: Itself = ->x{x} chunk(&Itself)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.