home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.prolog
- Path: sparky!uunet!utcsri!newsflash.concordia.ca!ccu.umanitoba.ca!mizar.cc.umanitoba.ca!zyang
- From: zyang@ccu.umanitoba.ca (Z. Yang)
- Subject: pointers needed on list processing
- Message-ID: <BxGLnG.CD4@ccu.umanitoba.ca>
- Keywords: sub sum, nested list
- Sender: news@ccu.umanitoba.ca
- Nntp-Posting-Host: antares.cc.umanitoba.ca
- Organization: University of Manitoba, Winnipeg, Canada
- Date: Mon, 9 Nov 1992 17:23:39 GMT
- Lines: 17
-
- Hi, netters,
-
- I am new in prolog and have some difficulty in list processing. What I want to
- do is write a predicate, ie. called 'subsum', which does following,
-
- ?- subsum([L1,L2,...],NewList).
- NewList = [Sum_of_L1,Sum_of_L2,...]
-
- where L1, L2 etc. are lists themselves(could be nested).
-
- Any pointers will be appreciated.
- Thanks in advance to all kind souls.
-
- -zgy
-
-
-
-