Skip to content

Instantly share code, notes, and snippets.

@kfigiela
Last active December 29, 2015 08:09
Show Gist options
  • Save kfigiela/7641560 to your computer and use it in GitHub Desktop.
Save kfigiela/7641560 to your computer and use it in GitHub Desktop.
%setA set < A B C >
%setB set < X Y >
%setC_relation set[2] <
X A
X B
Y C
>
#!/usr/bin/cmpl
%data test.cdat
parameters:
echo setA;
echo setB;
{b in setB:
setC[b] := set{[bi, a] in setC_relation, b = bi : a };
}
echo "setC[X] ";
echo setC["X"];
echo "setC[Y] ";
echo setC["Y"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment