G-d willing
Hello,
I want to use the NonEmpty for a list of Decimals within a template, and I can’t find a way in doing so.
When I am doing it on a regular data type it works okay, as follows:
let nums = NE.NonEmpty
with
hd = 2
tl = []
But when I am trying to do the same on a template I am getting an error.
template NonEmptyTest
with
sideA: Party
nums: NE.NonEmpty [Int]
where
signatory sideA
setup : Script ()
setup = script do
alice<- allocatePartyWithHint "Alice" (PartyIdHint "Alice")
submit alice do
createCmd NonEmptyTest
with
sideA=alice
nums= NE.NonEmpty
with
hd = 2
tl = []
Can you please tell me what am I doing wrong?