primus-0.1.0.0: NonEmpty and positive functions
Copyright(c) Grant Weyburne 2022
LicenseBSD-3
Safe HaskellSafe-Inferred
LanguageHaskell2010

Primus.Extra

Description

 
Synopsis
  • on1 :: forall f a a' b c. (b -> b -> c) -> (forall x. f x -> b) -> f a -> f a' -> c
  • on2 :: forall f a a' a2 a2' b c. (b -> b -> c) -> (forall x y. f x y -> b) -> f a a2 -> f a' a2' -> c
  • comparing1 :: forall f a a' b. Ord b => (forall x. f x -> b) -> f a -> f a' -> Ordering
  • (.@) :: (c -> d) -> (a -> b -> c) -> a -> b -> d

Documentation

on1 :: forall f a a' b c. (b -> b -> c) -> (forall x. f x -> b) -> f a -> f a' -> c Source #

more flexible version of on that allows differing types for the same container

on2 :: forall f a a' a2 a2' b c. (b -> b -> c) -> (forall x y. f x y -> b) -> f a a2 -> f a' a2' -> c Source #

more flexible version of on that allows differing types for the same container but using two parameters

comparing1 :: forall f a a' b. Ord b => (forall x. f x -> b) -> f a -> f a' -> Ordering Source #

more flexible version of compare that allows differing types for the same container

(.@) :: (c -> d) -> (a -> b -> c) -> a -> b -> d infixr 8 Source #

compose a two arg function followed by a one arg function