"Source: Text/Aggregates/Set.text";
"Line: 2225";
"Date: Thu Sep 25 14:47:47 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Aggregates/Set.text, line: 2225
// Example: H10E14 ()
print "Example: H10E14";
ei := GetEchoInput();
SetEchoInput(true);
function choose(S, k)
   if k eq 0 then
      return { { } };
   else
      return &join{{  s join { x} : s in choose(S diff { x}, k-1) } : x in S};
   end if;  
end function;
 S := { 1, 2, 3, 4 };   
choose(S, 2);  
SetEchoInput(ei);
