20 lines
371 B
Text
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.
|