Arbitrary abbreviations in phobos considered ridiculous

Nick Sabalausky a at a.a
Wed Mar 7 21:52:57 PST 2012


"Ary Manzana" <ary at esperanto.org.ar> wrote in message 
news:jj94mb$1i7v$1 at digitalmars.com...
>
> Here's something I wrote today:
>
> parent_ids = results.map{|x| 
> x['_source']['parent_ids']}.flatten.uniq.compact
> Hash[Site.find(parent_ids).map{|x| [x.id, x]}]
>

When you format it like that (that is to say, when you *don't* format it), 
yea, it's unreadable. Which is why I do such things like this:

parent_ids =
    results
    .map{|x| x['_source']['parent_ids']}
    .flatten.uniq
    .compactHash[
        Site.find(parent_ids).map{|x| [x.id, x]}
    ]




More information about the Digitalmars-d mailing list