Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. mrtommy

    Please help with Prolog examples

    Or this is correct? Pleas reply... double([],[]). double([H|T],[H,H|Y]) :- double(T,Y).
  2. mrtommy

    Please help with Prolog examples

    Is that correct? ?- dupli([a,b,c],2,X). X = [a,a,b,b,c,c,]
  3. mrtommy

    Please help with Prolog examples

    Fine... That´s great... Thank You... But I don´t know, how to do second example... I really need help... I have a exam on friday...
  4. mrtommy

    Please help with Prolog examples

    I have this for first example and I don´t know if is it right... sum([],0). sum([H | T], S) :- integer(H), sum(T, S1), S is S1 + H.
  5. mrtommy

    Please help with Prolog examples

    Hello... I really need help with these examples... Thank You... 1) sum (List, X) Predicate stored in the variable X total value of all elements of list List. 2) double (List, ListList) Predicate stored in the variable ListList list where each list element List occurs twice in a row.

Part and Inventory Search

Back
Top