• 0

PROLOG help


Question

Hey, I've been going through the website LearnPrologNow! (learnprolognow.org) And i've come across a problem that's got me stumped.

-----------------------------------------------------------------------------------------

Write a predicate addone2/ whose first argument is a list of integers, and whose

second argument is the list of integers obtained by adding 1 to each integer in

the first list. For example, the query

addone([1,2,7,2],X).

should give

X = [2,3,8,3].

---------------------------------------------------------------------------------------------

Any advice and or.....solutions :D

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.