/bootstrap-your-zuul/BootstrapYourZuul/Connection/map.dhall

Copy path to clipboard

Helper function to map over a list connection for Pipeline definition

Source

--| Helper function to map over a list connection for Pipeline definition
let Prelude = (../../imports.dhall).Prelude

./Type.dhallConnection =./getName.dhalle.dhall, getName = ./getName.dhall }

let map
: forall (type : Type) ->
forall (f : Connection.Type -> type) ->
forall (xs : List Connection.Type) ->
List { mapKey : Text, mapValue : type }
= \(valueType : Type) ->
\(f : Connection.Type -> valueType) ->
Prelude.List.map
Connection.Type
{ mapKey : Text, mapValue : valueType }
( \(conn : Connection.Type) ->
{ mapKey = Connection.getName conn, mapValue = f conn }
)

in map