A question about tuples
Raphael Collet
raphael.collet at uclouvain.be
Fri Aug 10 10:09:56 CEST 2007
Luis Quesada wrote:
> Create the list of variables and the list of domains separately. Then
> associate each variable with its domain:
>
> declare
> Vars={List.make 10}
> Doms=for I in 1..10 collect:C do {C 1#10+I} end
> for X in Vars D in Doms do X::D end
> {Show Vars}
You can even *map* each domain to a new variable with Map and FD.int:
Doms=[[1 3 5] ... [3 6 10 15]]
Vars={Map Doms FD.int}
Cheers,
raph
More information about the mozart-users
mailing list