From ruby-talk-admin@ruby-lang.org Thu Dec 15 21:14:06 2005 Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (8.12.3/8.12.3/Debian-6.6) with ESMTP id jBFCE6Zk016115; Thu, 15 Dec 2005 21:14:06 +0900 Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 01A8B5B14; Thu, 15 Dec 2005 21:14:07 +0900 (JST) Received: from localhost (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 41712F04847; Thu, 15 Dec 2005 21:14:10 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id E5A15F04846; Thu, 15 Dec 2005 21:14:08 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [210.163.138.100]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 2A4B3630028; Thu, 15 Dec 2005 21:14:11 +0900 (JST) Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id DFE2833D98; Thu, 15 Dec 2005 21:14:06 +0900 (JST) Received: from localhost (beryllium.ruby-lang.org [127.0.0.1]) by beryllium.ruby-lang.org (Postfix) with ESMTP id 42BDE33ED3 for ; Thu, 15 Dec 2005 21:13:56 +0900 (JST) Received: from beryllium.ruby-lang.org ([127.0.0.1]) by localhost (beryllium.ruby-lang.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15073-02 for ; Thu, 15 Dec 2005 21:13:56 +0900 (JST) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by beryllium.ruby-lang.org (Postfix) with ESMTP id C45CA33C83 for ; Thu, 15 Dec 2005 21:13:55 +0900 (JST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Emry3-0004RH-Fx for ruby-talk@ruby-lang.org; Thu, 15 Dec 2005 13:12:15 +0100 Received: from 159.red-83-37-178.dynamicip.rima-tde.net ([83.37.178.159]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 13:12:15 +0100 Received: from matiassurdi by 159.red-83-37-178.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Dec 2005 13:12:15 +0100 Delivered-To: ruby-talk@ruby-lang.org Date: Thu, 15 Dec 2005 21:13:56 +0900 Posted: Thu, 15 Dec 2005 14:11:16 +0100 From: Matias Surdi Reply-To: ruby-talk@ruby-lang.org Subject: Re: ruby beats them all Sender: news To: ruby-talk@ruby-lang.org (ruby-talk ML) Message-Id: In-Reply-To: References: <30085.1134584182@www7.gmx.net> X-ML-Name: ruby-talk X-Mail-Count: 17 X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address ruby-talk-ctl@ruby-lang.org; help= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051017) X-Original-To: ruby-talk@ruby-lang.org X-Injected-Via-Gmane: http://gmane.org/ X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 159.red-83-37-178.dynamicip.rima-tde.net X-Accept-Language: es-es, es X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ruby-lang.org X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on beryllium.ruby-lang.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=7.0 tests=BAYES_00,BLARS00, BLARS_SPAM00,CONTENT_TYPE_PRESENT,EXIM_ERRWARN,RCVDFRMLOCALIP, RCVD_IN_BLARS,RCVD_IN_BLARS_SPAM autolearn=ham version=3.0.3 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk Lines: 49 List-Id: ruby-talk.ruby-lang.org List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] List-Post: List-Owner: List-Help: List-Unsubscribe: X-Virus-Scanned: by AMaViS snapshot-20020531 Jeff Wood escribió: > Nice. > > On 12/14/05, Christian Neukirchen wrote: > >>"Peter Ertl" writes: >> >> >>>that why I love ruby (and functional languages in general) >>> >>>def fibonacci(n) >>> a, b = 1, 1 >>> n.times do >>> a, b = b, a + b >>> end >>> a >>>end >> >>That's not functional... >> >>How about really doing it functional? >> >>def fib(n) >> (1..n-2).inject([1, 1]) { |(a, b), n| [b, a+b] }.last >>end >> >>:) >> >> >>>elegance beats ignorance (ruby vs. java) >> >>-- >>Christian Neukirchen http://chneukirchen.org >> >> > > > > -- > "Remember. Understand. Believe. Yield! -> http://ruby-lang.org" > > Jeff Wood > You're all crazy.... :-) (in the good sense... ;-) )