From 4c88f29066c1276fbdc379527eaeb256f1a1a1eb Mon Sep 17 00:00:00 2001 From: Jonathan Sterling Date: Fri, 4 Sep 2015 12:12:53 -0700 Subject: [PATCH] [PR Feedback] Use `fromMaybe` instead of `maybe _ id` --- src/DOM/BrowserFeatures/Detectors.purs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DOM/BrowserFeatures/Detectors.purs b/src/DOM/BrowserFeatures/Detectors.purs index 916cb19..1a7c295 100644 --- a/src/DOM/BrowserFeatures/Detectors.purs +++ b/src/DOM/BrowserFeatures/Detectors.purs @@ -9,7 +9,7 @@ import Control.Monad.Eff.Exception import qualified Data.Array as Arr import qualified Data.List as L import qualified Data.Map as M -import Data.Maybe (maybe) +import Data.Maybe (fromMaybe) import Data.Foldable (foldr) import Data.Traversable (traverse) import Data.Tuple @@ -33,6 +33,6 @@ detectInputTypeSupportMap = M.fromList <$> traverse (\t -> Tuple t <$> detectInp detectBrowserFeatures :: forall e. Eff (dom :: DOM | e) BrowserFeatures detectBrowserFeatures = do inputTypeSupportMap <- detectInputTypeSupportMap - pure { inputTypeSupported : maybe false id <<< flip M.lookup inputTypeSupportMap + pure { inputTypeSupported : fromMaybe false <<< flip M.lookup inputTypeSupportMap }