Modularise your control
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ playIfFree c times = do
|
||||
mayChan <- Mix.getAvailable Mix.DefaultGroup
|
||||
case mayChan of
|
||||
Nothing -> return Nothing
|
||||
Just i -> fmap Just $ Mix.playOn i times c
|
||||
Just i -> Just <$> Mix.playOn i times c
|
||||
|
||||
haltMaybe :: Maybe Mix.Channel -> IO (Maybe Sound)
|
||||
haltMaybe (Just x) = Mix.halt x >> return Nothing
|
||||
|
||||
Reference in New Issue
Block a user