Created
December 22, 2018 16:51
-
-
Save DonaldKellett/143b4a66ff2a1c707891d417a7008aa0 to your computer and use it in GitHub Desktop.
Learn Prolog Now! - Chapter 5 - Practical Session - Programming Exercise 1 - Minimum of a list using tail recursion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accMin([H | T], A, Result) :- H < A, accMin(T, H, Result). | |
accMin([H | T], A, Result) :- H >= A, accMin(T, A, Result). | |
accMin([], A, A). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment