From: Dan Schmidt Date: 2001-03-13T01:10:02+09:00 Subject: [ruby-talk:12502] Re: Haskell goodies, RCR and challenge Robert Feldt writes: | On Sat, 10 Mar 2001, Yukihiro Matsumoto wrote: | | > In message "[ruby-talk:12330] Haskell goodies, RCR and challenge" | > on 01/03/10, Robert Feldt writes: | > | > | [1,2,3,4].zip([10,20,30]) # => [[1,10],[2,20],[3,30]] | > | [1,2,3].tail # => [2,3] | > | [1,2,3,4].init # => [1,2,3] | > | > Behavior of these functions are not really apparent. I think we need | > to discuss more about these. | > | They have been used in the functional programming community for years with | these names (which doesnt mean we have to adopt them...). I'd say tail | is a good name and a very useful method. 'init' is probably too close to | 'initialize' so not good name. IMHO, 'zip' is a pretty good name (think | about a zipper in your pants or jacket...) but I'm not sure the | functionality is useful enough to promote it into the base lib. For what it's worth, Python has a zip function with the same behavior. 'init' is not so important to me, but 'tail' is very useful. Be thankful no one's asking to name it 'cdr' :) Thanks for implementing these, Robert! -- http://www.dfan.org