[Haskell-cafe] convert a list of booleans into Word*

Eduard Sergeev Eduard.Sergeev at gmail.com
Wed Sep 30 14:25:11 EDT 2009



Bulat Ziganshin-2 wrote:
> 
> sum . zipWith (*) (map (2^) [0..])
> 

foldr1 $ \b -> (+b) . (*2)

-- 
View this message in context: http://www.nabble.com/convert-a-list-of-booleans-into-Word*-tp25677589p25686400.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list