Chart-1.9.5: A library for generating 2D Charts and Plots

Safe Haskell | Safe-Inferred
Language | Haskell98

Graphics.Rendering.Chart.Utils

Description

Non chart specific utility functions.

Synopsis

- isValidNumber :: RealFloat a => a -> Bool
- log10 :: Floating a => a -> a
- maybeM :: Monad m => b -> (a -> m b) -> Maybe a -> m b
- whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()

# Documentation

isValidNumber :: RealFloat a => a -> Bool #

Checks if the given value is and actual numeric value and not a concept like NaN or infinity.

log10 :: Floating a => a -> a #

Shorthand for the decimal logarithm

maybeM :: Monad m => b -> (a -> m b) -> Maybe a -> m b #

Version of `maybe` that returns a monadic value.

whenJust :: Monad m => Maybe a -> (a -> m ()) -> m () #

Specialization to ()