tools-yj 0.1.0.31 → 0.1.0.32
raw patch · 2 files changed
+11/−2 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Data.Bits.ToolsYj: popBit :: Bits b => b -> (Bool, b)
Files
- src/Data/Bits/ToolsYj.hs +10/−1
- tools-yj.cabal +1/−1
src/Data/Bits/ToolsYj.hs view
@@ -1,7 +1,13 @@ {-# OPTIONS_GHC -Wall -fno-warn-tabs #-} -module Data.Bits.ToolsYj (bitsToBits, checkBits, bitsList) where+module Data.Bits.ToolsYj ( + bitsToBits, checkBits, bitsList,++ popBit++ ) where+ import Control.Arrow import Data.Bits @@ -15,3 +21,6 @@ bitsToBits :: (Bits a, Bits b) => Int -> a -> b bitsToBits n b = foldl setBit zeroBits . map fst . filter snd $ map (id &&& testBit b) [0 .. n - 1]++popBit :: Bits b => b -> (Bool, b)+popBit n = (n `testBit` 0, n `shiftR` 1)
tools-yj.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: tools-yj-version: 0.1.0.31+version: 0.1.0.32 synopsis: Tribial tools description: Please see the README on GitHub at <https://github.com/YoshikuniJujo/tools-yj#readme> category: Tools