between-0.9.0.2: between.cabal
name: between
version: 0.9.0.2
synopsis: Function combinator "between" and derived combinators
description:
It turns out that this combinator
.
> f ~@~ g = (f .) . (. g)
.
is a powerful thing. It was abstracted from following (commonly used)
pattern @f . h . g@ where @f@ and @g@ are fixed.
.
This library not only define @~\@~@ combinator, but also some derived
combinators that can help us to easily define a lot of things including
lenses. See <http://hackage.haskell.org/package/lens lens package> for
detais on what lenses are.
.
Function @Data.Function.on@ can be implemented using @~\@~@ as:
.
> on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
> on f g = (id ~@~ g ~@~ g) f
.
If function @on3@ existed in /base/ then it could be defined as:
.
> on3 :: (b -> b -> b -> d) -> (a -> b) -> a -> a -> a -> d
> on3 f g = (id ~@~ g ~@~ g ~@~ g) f
.
Other usage examples and documentation can be found in
"Data.Function.Between".
homepage: https://github.com/trskop/between
bug-reports: https://github.com/trskop/between/issues
license: BSD3
license-file: LICENSE
author: Peter Trško
maintainer: peter.trsko@gmail.com
copyright: (c) 2013, 2014 Peter Trško
category: Data
build-type: Simple
cabal-version: >=1.8
extra-source-files:
README.md
, ChangeLog.md
flag pedantic
description:
Pass additional warning flags including -Werror to GHC during compilation.
default: False
library
hs-source-dirs: src
exposed-modules: Data.Function.Between
build-depends: base > 3 && < 5
ghc-options: -Wall
if impl(ghc >= 6.8)
ghc-options: -fwarn-tabs
if flag(pedantic)
ghc-options: -Werror
source-repository head
type: git
location: git://github.com/trskop/between.git
source-repository this
type: git
location: git://github.com/trskop/between.git
tag: v0.9.0.2