Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #107.41K
~2K People Reached
Favorite Forums
Member Avatar for BlackIris

Hi everybody, I'm having a little problem with finding sum of nested list in Prolog. So far what I have is [ICODE] totalSum([],0). totalSum([H|T],S):- totalSum(T,Sum), S is Sum + H. totalSum([H|T],S):- totalSum(H,Sum1), totalSum(T,Sum2), S is Sum1+Sum2. [/ICODE] With first two predicates, I have no problems getting sum of not-nested list. …

Member Avatar for fgmart
0
2K