function foo(n: integer): set of integer;
begin
if n = 0 then result := []
else
result := [n mod 10] + foo(n div 10)
end;
var a := 12345;
var s: set of integer := [];
s := foo(a);
Print(s)
end.
function foo(n: integer): set of integer;
begin
if n = 0 then result := []
else
result := [n mod 10] + foo(n div 10)
end;
begin
var a := 12345;
var s: set of integer := [];
s := foo(a);
Print(s)
end.