RosettaCodeData/Task/Mutual-recursion/Picat/mutual-recursion-3.picat
2023-07-01 13:44:08 -04:00

20 lines
371 B
Text

go =>
N = 30,
println(func),
test_func(N),
println(pred),
test_pred(N),
nl.
nl.
% Testing the function based approach
test_func(N) =>
println([M : I in 0..N, male(I,M)]),
println([F : I in 0..N, female(I,F)]),
nl.
% Testing the predicate approach
test_pred(N) =>
println([M : I in 0..N, male(I,M)]),
println([F : I in 0..N, female(I,F)]),
nl.