outcl08 - EEL-6841 Spring 2016 Class Notes 8 Dr Arroyo...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
EEL-6841 Class Notes 8 Spring 2016 Dr. Arroyo 1 OUTLINE Homework: Read Chapters 7-9 in Clocksin & Mellish (C & M) Homework 3 : Due: Tuesday January 19, 2016 P3: Write and test Prolog function makeset(X,Y). Such that list Y contains only the members of list X without duplicates. Homework 4: Due: Thursday January 21, 2016 P4: We are given a parts list, which is a list of 2-ary ‘quantity’ structures having functor q. The quantity structure q(N,P) stands for ‘a quantity of N parts of type P’. For example, the parts list [q(5,table), q(45,chair), q(2,board)] is a representation of five tables, forty five chairs and two boards. Write the function collect(X,Y) such that input parts list X, possibly containing duplicate parts, produces the equivalent list Y containing no duplicates, with the quantities of all like parts summed. For example: collect([q(10,tables),q(10,chair),q(5,board),q(10,chair),q(5,board)],Z) is collected into Z=[q(10,tables),q(20,chair),q(10,board)]. I. Miscellaneous Predicates & Operations II. I/O Examples Mapcar.pl mapcar(_,[],[]).
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern