From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id B44B620A1E for ; Fri, 14 Dec 2018 20:22:54 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 290671213A1; Sat, 15 Dec 2018 05:22:52 +0900 (JST) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by neon.ruby-lang.org (Postfix) with ESMTPS id AA7071212D7 for ; Sat, 15 Dec 2018 05:22:43 +0900 (JST) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id E9A602400FB for ; Fri, 14 Dec 2018 21:22:39 +0100 (CET) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 43Ghmt4Bqmz9rxG; Fri, 14 Dec 2018 21:22:37 +0100 (CET) Date: Fri, 14 Dec 2018 20:22:36 +0000 To: Ruby developers Cc: ruby-core@ruby-lang.org From: oleynikov@posteo.li References: In-Reply-To: Message-Id: X-ML-Name: ruby-core X-Mail-Count: 90532 Subject: [ruby-core:90532] Re: [Ruby trunk Feature#15323] [PATCH] Proposal: Add Enumerable#filter_map X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" nardonykolyszyn@gmail.com wrote: > (1..10).map { |e| e.even? ? (e * 2) : e } Yeah, but without `#filter` this is still an array with 10 elements.