packages feed

ychr-0.1.0.0: test/golden/function_recursive/function_recursive.chr

:- module(function_recursive, [compute_fact/2]).
:- chr_constraint compute_fact/2.
:- function factorial/1.

factorial(0) -> 1.
factorial(N) | N > 0 -> N * factorial(N - 1).

compute_fact(N, R) <=> R is factorial(N).