Robert Feldt <feldt / ce.chalmers.se> 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 <feldt / ce.chalmers.se> 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