Hi All,
Although not prolog based. I'm trying to write a function in Haskell 'prod lst1 lst2' which sums the products of corresponding elements of two lists. e.g
prod [1,2,3] [4,5,6] = 1*4 + 2*5 + 3*6 =32
I'm think the 'map' function is to be used but i dont know how to implement the...
I'm making a Londen underground tracking program. I have already created the code that finds and places the stations in a list. Its just that my program builds up the same list of stations twice over, once as a route and once as the avoid list, how can i use the accumulator parameter to tackle this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.