Skip to content

Commit

Permalink
Replace for with one from Data.Traversable
Browse files Browse the repository at this point in the history
  • Loading branch information
zlondrej committed Oct 31, 2024
1 parent 95c9e7f commit 3d07f7d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import Data.Maybe hiding (fromJust)
import qualified Data.Maybe.Optics as O
import Data.Monoid
import Data.Monoid.Utils
import Data.Traversable (for)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
Expand Down Expand Up @@ -202,10 +203,6 @@ copy x fromThis toThat = set x (view x fromThis) toThat

----------------------------------------

-- | Just @flip map@.
for :: [a] -> (a -> b) -> [b]
for = flip map

-- | Read a value and return 'Nothing' if an error occurs during parsing.
maybeRead :: Read a => Text -> Maybe a
maybeRead s =
Expand Down

0 comments on commit 3d07f7d

Please sign in to comment.