Newbie without any idea!!!
- From: leo@xxxxxxxxxxxxxx
- Date: 29 Jun 2005 00:30:57 -0700
Hi! The following is the requirement of the program
sum(X, 4) : X would be evaluated to 4.
sum(X, [2,4]): X would be evaluated to 6.
sum(X, [2,[2,2]]): X would be evaluated to 6.
How can I implement by Prolog?
I have the following idea.
sum(X,X).
sum(X,[H|T]):-..............
Thanks!
Ming
.
- Follow-Ups:
- Re: Newbie without any idea!!!
- From: Mauro Di Nuzzo
- Re: Newbie without any idea!!!
- Prev by Date: Re: After Clocksin & Mellish?
- Next by Date: Re: Free Prolog++ for Windows ...??
- Previous by thread: sicstus + pillow + proxy
- Next by thread: Re: Newbie without any idea!!!
- Index(es):