Scrapbook-0.4.0: code examples
Copyright© Frank Jung 2021
LicenseGPL-3
Safe HaskellSafe-Inferred
LanguageHaskell2010

ApplyToTuple

Description

Example rank-n-type from Explaining Haskell RankNTypes for all.

Synopsis

Documentation

applyToTuple :: forall b c. (forall a. [a] -> Int) -> ([b], [c]) -> (Int, Int) Source #

Example of a rank N type. This will apply the function to the provided input tuple.

>>> applyToTuple length ("foo", [1,2,3,4])
(3,4)