Suppose that I have a function
expirationDate : Int -> Date -> Date -> Date
expirationDate offset maturityDate creationDate =
if somePredicate maturityDate then
...
What is the recommended way to convey the different Date
arguments in this function. Some languages support labeled or named arguments. What’s the best way to do something like this in Daml?
I’ve found myself wanting to create and pass custom records for function;
data ExpirationDateArgs = ExpirationDateArgs with
offset : Int
maturityDate : Date
creationDate : Date
but this does not really help when you start using ..
syntax.