File: Applicative.hs

package info (click to toggle)
github-backup 1.20170301-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 448 kB
  • sloc: haskell: 3,858; makefile: 27; sh: 9
file content (16 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{- applicative stuff
 -
 - Copyright 2012 Joey Hess <id@joeyh.name>
 -
 - License: BSD-2-clause
 -}

module Utility.Applicative where

{- Like <$> , but supports one level of currying.
 - 
 - foo v = bar <$> action v  ==  foo = bar <$$> action
 -}
(<$$>) :: Functor f => (a -> b) -> (c -> f a) -> c -> f b
f <$$> v = fmap f . v
infixr 4 <$$>