PRELUDE: simplify 'first'

This commit is contained in:
hasufell 2014-12-14 18:01:13 +01:00
parent afe35829cd
commit c940bfc534
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
module MyPrelude where
import Control.Arrow ((***))
import Data.List
@ -64,7 +65,7 @@ rmdups =
-- |Apply a function to the first element of a tuple.
first :: (a -> b) -> (a,c) -> (b,c)
first f (x,y) = (f x, y)
first = (*** id)
-- |Sequentialize a list, such as: