Hello Jared,
Tuesday, July 18, 2006, 11:12:09 PM, you wrote:
% defining natural numbers
natural(zero).
natural(s(X)) :- natural(X).
% translate to integers
toInt(zero, 0).
toInt(s(X), N) :- toInt(X, Y), N is Y + 1.
Thank you. I can now more precisely state that what I'm trying
On Tue, 18 Jul 2006, Jared Warren wrote:
% defining natural numbers
natural(zero).
natural(s(X)) :- natural(X).
% translate to integers
toInt(zero, 0).
toInt(s(X), N) :- toInt(X, Y), N is Y + 1.
Thank you. I can now more precisely state that what I'm trying to
figure out is: what is
Hello Jared,
Tuesday, July 18, 2006, 9:05:09 AM, you wrote:
% defining natural numbers
natural(zero).
natural(s(X)) :- natural(X).
% translate to integers
toInt(zero, 0).
toInt(s(X), N) :- toInt(X, Y), N is Y + 1.
Thank you. I can now more precisely state that what I'm trying to
figure
Thank you to everyone for the responses. I guess what I should have
clarified is that I know how Peano numbers are *normally* encoded in
the type language (I am very familiar with the HList library), but I
would like to know why the type language appears to require data
structures to do so while
jawarren:
Thank you to everyone for the responses. I guess what I should have
clarified is that I know how Peano numbers are *normally* encoded in
the type language (I am very familiar with the HList library), but I
would like to know why the type language appears to require data
structures