in reply to Re: ASCII Pattern - Golf
in thread ASCII Pattern - Golf

And getting rid of the for loops appears to take another 10 strokes off.
$x=shift;$z=10-shift;map{$t=abs$z-$_;print map($t>abs$x-$_?$t:abs$x-$_ +,1..9),$/;}0..9

Replies are listed 'Best First'.
Re: Re: Re: ASCII Pattern - Golf
by tilly (Archbishop) on Sep 19, 2003 at 02:43 UTC
    You can get 4 more with shift vs pop. + 1 for a useless ;.
    $z=10-pop;$x=pop;map{$t=abs$z-$_;print map($t>abs$x-$_?$t:abs$x-$_,1.. +9),$/}1..9
    (I also fixed a bug.)