Help With Prolog Lists
        Posted  
        
            by 
                BeginnerPro
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by BeginnerPro
        
        
        
        Published on 2010-12-27T23:23:09Z
        Indexed on 
            2010/12/28
            1:54 UTC
        
        
        Read the original article
        Hit count: 216
        
Hi,
Im new to Prolog and was looking for some assistance. What i am trying to do is basically get the some of the list of list, if that makes sense? lol
What i am trying to achieve is.... sum([ [1,2],[3,4],[5,6] ]). should return: Number Of Lists: 3 List 1 3 List 2 7 List 3 11....etc
I can get the Number of Lists which is fairly simple but im not quite sure how to loop through the List and then for each List add the number up. Am i making this more complicated than it actually is? lol!
If anyone can help me or point me in the general direction that would be great.
Thanks in advance
© Stack Overflow or respective owner