in reply to Re: mini-golf: convert integer into list of powers of two
in thread mini-golf: convert integer into list of powers of two
That's 32 by my reckoning...
Using the assign-within-grep trick I applied to BrowserUK's solution, it is possible to take it down to 31 though:
0 1 2 3 1234567890123456789012345678901 sub{grep$_[0]&($_=1<<$_),0..31}
|
|---|