2006-06-13 ビット数を数える4 再帰版2(シンプルバージョン) bitCount4 :: Int -> Int bitCount4 0 = 0 bitCount4 b = (b .&. 1) + bitCount4(shiftR b 1)いかにも再帰的な感じ。