X hits on this document

Powerpoint document

COMP313A Programming Languages - page 76 / 92

268 views

0 shares

0 downloads

0 comments

76 / 92

76

Structures a family database

family(person(tom, fox, date(7,may, 1950), employed),

          person(ann, armstrong, date(9, may, 1951), employed),

          [person(pat, fox, date(5, may, 1973, unemployed),

             person(jim, fox, date(5, may, 1973), unemployed)]).

family(_,_,_). % any family

family(person(_, fox, _, _), _, _).  % the fox family

family(_, person(_,armstrong, _, _), _)% or the armstrong family

family(_, _, [_, _, _]).                                 % any three child family

family(_,person(Name, Surname, _, _), [_, _, _, | _]).

% all married women

who have at least three children

Document info
Document views268
Page views268
Page last viewedTue Jan 17 03:16:01 UTC 2017
Pages92
Paragraphs860
Words3091

Comments