Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Anyone know prolog?

  1. Mar 27, 2007 #1
    Does anyone here know Prolog? I'm using the SWI-Prolog interpreter.

    Given this list: [[1, 2], [2, 3], [3, 4]] how do you make it say Yes if 2 (of the first list) = 2 (of second list) and 3 (of second list) = 3 (of third list)? I'm having trouble visualizing this fact as the elements in the lists are lists, so we are basically dealing/recursing a list within a list.
  2. jcsd
  3. Apr 22, 2007 #2
    How about this

    Can't you just say this:


Share this great discussion with others via Reddit, Google+, Twitter, or Facebook