containers-indexed-1.xreate
No OneTemporary

File Metadata

Created
Thu, Jul 9, 1:35 AM

containers-indexed-1.xreate

//Expose indexes signature(anonymous):
a:: [(string, string, num)]; byName <- index(0); byCity <- index(1);
byNameAndCity <- index(0, 1).
//Expose index signature(named)
type Record =
{
name:: string,
city:: string,
age:: num
}.
b:: [Record]; byName <- index(Record.name).
//Use determined index
x = a["Rabat"]:: Record; index(byCity).
//Determined syntax(view)
viewByCity = a:: [Record]; index(byCIty).
x = viewByCity["Rabat"].
//Determined index(inline)
x = a[byCity: "Rabbat"]:: Record.
//Undefined index
x = a[{city: "Rabat"}] :: Record. <- index byCity should be deduced
x = a[{name: "Hind", city: "Rabat"}]

Event Timeline