Skip to content

Commit

Permalink
Make for more generic (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlondrej authored Nov 5, 2024
1 parent 95c9e7f commit 9944420
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scrive-prelude.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: scrive-prelude
version: 1.0.3.0
version: 1.0.3.1
author: Scrive AB
maintainer: Scrive AB
copyright: 2021
Expand Down
6 changes: 3 additions & 3 deletions src/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ copy x fromThis toThat = set x (view x fromThis) toThat

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

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

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

0 comments on commit 9944420

Please sign in to comment.