diff options
author | Guillermo Ramos | 2012-05-03 14:12:06 +0200 |
---|---|---|
committer | Guillermo Ramos | 2012-05-05 14:35:04 +0200 |
commit | 4fb3fa2758fd4db2bef1efc7ae531e0dadaf4ffa (patch) | |
tree | 1b41602f30eab257d284008da13d0437b709c988 /prolog/smallest.pl | |
parent | a36e9e7221841ffee75a8b35c07f3929240a0e17 (diff) | |
download | 7l-4fb3fa2758fd4db2bef1efc7ae531e0dadaf4ffa.tar.gz |
[Prolog] Día 2
Diffstat (limited to 'prolog/smallest.pl')
-rw-r--r-- | prolog/smallest.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/prolog/smallest.pl b/prolog/smallest.pl new file mode 100644 index 0000000..1a8835b --- /dev/null +++ b/prolog/smallest.pl @@ -0,0 +1,4 @@ +smallest([H], H). +smallest([H|T], S) :- + smallest(T, E), + (H<E -> S is H; S is E). |