prairie-0.0.4.0: A first class record field library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Prairie.Zip

Synopsis

Documentation

zipWithRecord :: forall rec. Record rec => (forall ty. ty -> ty -> Field rec ty -> ty) -> rec -> rec -> rec Source #

Take two records and zip them together with the provided function.

The field is given for the final parameter in the function, allowing you to use LambdaCase.

zipWithRecord
    (a b ->
        case
            UserName ->
                a <> b
            UserAge ->
                a + b
    )

Since: 0.0.4.0