reverse-arguments

Version 0.1.0.0 revision 0 uploaded by JonasScholl.

Package meta

Synopsis
Reverse the arguments of arbitrary functions.
Description

This module provides the reverseArgs function which flips the arguments of a function of arbitrary arity. The return value of the flipped function can not be fully polymorphic as this could imply it is a function.

Example:

myFlip :: (a -> b -> c -> d -> [e]) -> d -> c -> b -> a -> [e]
myFlip = reverseArgs

However, if you supply a proof (of the form IsFun a ~ 'False) that a is not a function, you can also return a polymorphic type.

Example:

myFlip :: IsFun e ~ 'False => (a -> b -> c -> d -> e) -> d -> c -> b -> a -> e
myFlip = reverseArgs
Author
Anselm Jonas Scholl
Bug reports
n/a
Category
Data
Copyright
(c) 2016 Anselm Jonas Scholl
Homepage
n/a
Maintainer
anselm.scholl@tu-harburg.de
Package URL
n/a
Stability
n/a

Components