I try to fetch a list of addresses with expired date by appending the address to list(address). However when doing map iteration, it encounters a persistent error says 'not True'.
Hope someone can guide a bit here. Thanks in advance!
Below is part of the code:
function checkPoint (var s : contract_storage) : contract_storage is
begin
function iter_op (const m : register) : list(address) is
block {
const removing_list : list(address) = list [];
function iterated (const i : address; const j : counter) : list(address) is
if j.maturityTime <= Tezos.now then i # removing_list else removing_list;
} with Map.iter (iterated, m); //error says: characters 11-33. Not true
const remove_creditors : list(address) = iter_op (s.creditorsMap); //creditorsMap is map (address, counter)
//...
// if above is bug free, I will start to remove the list of items in the map one by one
end with s