Fun fact: DAML was heavily inspired by ‘Composing contracts’ by Peyton-Jones, Seward and Eber [PJSE200031], too, and early versions of DAML looked more similar to what you show above than to today’s DAML. Just for fun, here’s a snippet from an early pre-public version of DAML:
iouChf =
\(owner :: Party) (obligor :: Party) (amount :: Integer) ->
{@ DESC
"IOU " <> toText obligor <> " --[" <> toText amount <> "]--> " <> toText owner
@}
await
-- [ "description": owner chooses then { "iou": iouChf owner obligor amount }
{ "settle":
owner chooses account :: Text at tstart then
{ "cash" : settleInChf owner obligor amount account tstart
}
, "sell":
owner chooses newOwner :: Party then
{ "iou": iouChf newOwner obligor amount
}
}
;
Almost unrecognizable!