[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: foldl and foldr

From: "Sean E. Russell" <ser@...>
Date: 2004-02-25 18:34:12 UTC
List: ruby-core #2510
On Wednesday 25 February 2004 11:57, Eivind Eklund wrote:
> > foldr() can be -- and is, in my example code -- implemented without
> > reverse(), which is the point of having it.
>
> Sorry - I read your original mail a little too fast.  Is this something
> you often find useful?  I have found inject useful, but I've never ended
> up doing reverse.inject, so I question the need for it somewhat.

No, foldr() is less commonly needed -- or, I should say, most folds can be 
done with either foldr or foldl, and of those that can't, the majority are 
*probably* left-associative.  There are a few cases where right-association 
is needed, but I don't run across them much.  Indeed, had I known about 
inject(), I wouldn't have posted my message.

> As far as I know, rcrchive.net is the official location now.

Thanks.

-- 
### SER   
### Deutsch|Esperanto|Francaise|Linux|XML|Java|Ruby|Aikido
### http://www.germane-software.com/~ser  jabber.com:ser  ICQ:83578737 
### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg

In This Thread

Prev Next