souplesse

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit ea313b7f6e16e89baac05d5f46b6a1fe052e2e80
parent e15c42ff4a274db387e0af843c226f1e59021bb9
Author: Daniel Barlow <dan@telent.net>
Date:   Thu, 31 Oct 2024 00:38:35 +0000

replace foo >>= return . bar with <&>

Diffstat:
Mlib/Track.hs | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/Track.hs b/lib/Track.hs @@ -25,6 +25,7 @@ import Data.Time.ISO8601 qualified import Debug.Trace (trace, traceShow) import Text.XML import Text.XML.Cursor as Cursor +import Data.Functor((<&>)) data Pos = Pos Float Float deriving (Show, Eq) @@ -91,10 +92,10 @@ elToPoint c = Right $ Point (Pos lat lon) - (listToMaybe ele >>= return . asFloat) + (listToMaybe ele <&> asFloat) utime - (listToMaybe cadence >>= return . asInt) - (listToMaybe power >>= return . asInt) + (listToMaybe cadence <&> asInt) + (listToMaybe power <&> asInt) Nothing where asFloat v = (read (Data.Text.unpack v) :: Float)