Skip to content

Commit

Permalink
fixing the factorial bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielduuarte committed Oct 12, 2018
1 parent f5223e1 commit 5e67abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion math/factorial/prolog/factorial.pl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
%recursion
factorial(N, F) :-
N1 is N - 1,
fat(N1, N2),
factorial(N1, N2),
F is N * N2.

0 comments on commit 5e67abe

Please sign in to comment.