Re: Need help with lists !
- From: pineapple.link@xxxxxxxxx
- Date: Tue, 13 Nov 2007 09:07:00 -0800
We can't do your assignments for you. The assignment you posted is
about the most simplistic Prolog assignment you'll find. Read your
Prolog book. Look at various examples online.
Hint: For the assignment above, you will need to learn how to take
apart and put a list together, you will need to learn recursion, you
will need to learn to use unification (the most basic Prolog technique
there is), and read up on the use of the "is" construct, because you
will probably need that for any math.
You will need to use trace early on to figure out what your code is
doing. I recommend taking an extremely basic, piecemeal approach.
Learn each basic thing separately. Write the most basic recursion
program you can write as a "test," and observe the behavior. Same for
taking lists apart and putting them together. In the end, you can put
everything you've learned together to solve the problems.
Hope this helps.
.
- References:
- Need help with lists !
- From: marijus
- Need help with lists !
- Prev by Date: Need help with lists !
- Next by Date: Java to Lisp/Scheme or Prolog translator/parser?
- Previous by thread: Need help with lists !
- Next by thread: Re: Need help with lists !
- Index(es):
Relevant Pages
|
|