Re: Declarative constraints in practical terms
From: x <x_at_not-exists.org>
Date: Mon, 27 Feb 2006 16:52:22 +0200
Message-ID: <dtv3n7$oi8$1_at_emma.aioe.org>
Date: Mon, 27 Feb 2006 16:52:22 +0200
Message-ID: <dtv3n7$oi8$1_at_emma.aioe.org>
"David Cressey" <dcressey_at_verizon.net> wrote in message
news:y0EMf.7424$UN1.5544_at_trndny08...
> Is a FORTRAN statement a statement?
There are people that say this:
is more declarative than this:
I don't know why but I think it has something to do with the fact that in
some PROLOG implementations the inequality tests are not allowed on unbouded
max([M],M).
max([H|T],M):-max(T,M),H<M.
max([H|T],H):-max(T,N), H>=N.
max([],M,M).
max([H|T],M,R):-H<M, max(T,M,R).
max([H|T],M,R):-H>=M, max(T,H,R).