(storep john ( (weight . 180) (height . 170) (sex . M) (univ . umd) (year . 1998) (age . 23) (salary . 25000) (homestate . iowa) (married . n) (kidnames . nil) )) (storep george ( (weight . 215) (height . 190) (sex . M) (univ . mit) (year . 1984) (age . 22) (salary . 45000) (homestate . maryland) (married . y) (kidnames . nil) )) (storep nick ( (weight . 160) (height . 176) (sex . M) (univ . upenn) (year . 2000) (age . 20) (salary . 20000) (homestate . pennsylvania) (married . n) (kidnames . nil) )) (storep adam ( (weight . 158) (height . 160) (sex . M) (univ . nil) (year . 1994) (age . 25) (salary . 30000) (homestate . vriginia) (married . y) (kidnames . (john linda)) )) (storep david ( (weight . 145) (height . 150) (sex . M) (univ . berkeley) (year . 1969) (age . 21) (salary . 70000) (homestate . md) (married . n) (kidnames . nil) )) (storep anne ( (weight . 100) (height . 150) (sex . F) (univ . vtech) (year . 2001) (age . 19) (salary . 15000) (homestate . virginia) (married . y) (kidnames . (gary roger) ) )) (storep lise ( (weight . 170) (height . 170) (sex . F) (univ . stanford) (year . 1980) (age . 30) (salary . 55000) (homestate . california) (married . n) (kidnames . nil) )) (storep michelle ( (weight . 110) (height . 176) (sex . F) (univ . gtech) (year . 1975) (age . 18) (salary . 60000) (homestate . georgia) (married . y) (kidnames . (robert)) )) (insertp john lieutenant) (insertp george colonel) (insertp nick private) (insertp adam lieutenant) (insertp david general) (insertp anne private) (insertp lise colonel) (insertp michelle general) (insertp noname general) ;Result: nil (findall (lep salary 30000)) ;Result: (anne adam nick john) (findall (and (gep salary 30000) (eqp sex M))) ;Result: (david adam george) (findallinset lieutenant t) ;Result: (adam john) (findnext (lep height 150)) ;Result: anne (findnext (eqp sex M)) ;Result: david (findnextinset major t) ;Result: nil (findnextinset private (ltp age 20)) ;Result: anne (modifyp john salary 27000) (removep noname general) ;Result: nil (removep lise colonel) (removep adam lieutenant) (insertp adam major) (findallinset major t) ;Result: (adam) ; Notice that for some of the previous operations the result depends ; on how you implemented the addition to a set. ; ; The previous results are based on the assumption that you make new ; additions at the front of the lists