implemented getNumBeads
This commit is contained in:
@@ -24,7 +24,7 @@ License along with this program. If not, see
|
||||
|
||||
-}
|
||||
|
||||
module Abacus (Abacus, newAbacus) where
|
||||
module Abacus (Abacus, newAbacus, getNumBeads) where
|
||||
|
||||
import Abacus.Internal
|
||||
|
||||
@@ -40,4 +40,8 @@ newAbacus beads rungs = if beads < 1 || rungs < 1
|
||||
then Nothing
|
||||
else Just $ Abacus beads $ replicate rungs 0
|
||||
|
||||
-- | Returns the number of beads per rung in an abacus
|
||||
getNumBeads :: Abacus -> Int
|
||||
getNumBeads = abacusNumBeads
|
||||
|
||||
--jl
|
||||
|
||||
Reference in New Issue
Block a user