title: clpfd - constraint upper bond of domain the be the maximum of a list of elements
body: <p>Given the following code:</p>
  
  <pre><code>solve(G,L) :-
      G = [A0,B0,C0,D0],
      L = [A1,B1,C1,D1,A2,B2,C2,D2,A3,B3,C3,D3,A4,B4,C4,D4],
      G ins 0..4,
      L ins 0..max(G).
  </code></pre>
  
  <p>I want to constraint L to not contain values that are higher than the maximum value contained in G, but I get a "domain error" when using this syntax. Is there another way to express this?</p>