implemented getNumBeads

This commit is contained in:
2024-08-20 20:41:28 -04:00
parent f43eb607ff
commit 9bd9b4a05e
2 changed files with 22 additions and 2 deletions

View File

@@ -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