in reply to Re: Re: (Golf) Decorating the Christmas Tree
in thread (Golf) Decorating the Christmas Tree

Independently arriving at this (after playing some more), I get:
print$"x$h--,$_-1?map{rand>$f?'=':qw(* 0 @ +)[rand 4]}2..2*$_:'*',$/fo +r 1..$h
For some reason, I count that at 77?? Why am I one shorter?

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Re: Re: (Golf) Decorating the Christmas Tree
by runrig (Abbot) on Dec 04, 2001 at 01:54 UTC
    You are not putting parens around the map arguments, saving one character. You have block delimiters around the first map argument instead of parens around both arguments, so you don't need the comma to separate the two arguments. Congratulations :)

    Update: Though it seems the parens were completely unnecessary (though a space between map and the first arg is necessary in japhy's answer, so now your answer's are tied, i.e. length('map func,@arr')==length('map{func}@array')).