sale-items.taq

$ java -jar taq.jar sale-items

Running query format_stock in global scope 
mug USD5.66
cap USD15.00
t-shirt USD25.89

Description

sale-items.taq demonstrates growing a list by appending items to it. The “format_stock” query produces a text list with each item containing information originating from a “stock” axiom list


axiom list stock (item, price)
{ "mug", 5.66 }
{ "cap", 15.00 }
{ "t-shirt", 25.89 }

template sale_format
{
export list<string> memorabilia,
currency.USD price
}
(
string text = item + " " + price.format),
memorabilia += text
)

query format_stock(stock:sale_format)