RosettaCodeData/Task/Mutual-recursion/Picat/mutual-recursion-3.picat

21 lines
371 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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.