packages feed

phonetic-languages-simplified-generalized-examples-common-0.1.0.0: Phonetic/Languages/General/SimpleConstraints.hs

-- |
-- Module      :  Phonetic.Languages.General.SimpleConstraints
-- Copyright   :  (c) OleksandrZhabenko 2020-2021
-- License     :  MIT
-- Stability   :  Experimental
-- Maintainer  :  olexandr543@yahoo.com
--
-- Some code shared for different Main modules.
-- Is taken from the module Phonetic.Languages.Simplified.SimpleConstraints from the
-- @phonetic-languages-simplified-examples-common@ package.

module Phonetic.Languages.General.SimpleConstraints where

import Data.Monoid

showB :: Int -> Bool -> String
showB n bool
 | n >= 2 && bool == True = 'B':show (n - 1) `mappend` concatMap show [0..n - 2]
 | otherwise = ""