(dbstore john ( (weight . 180) (height . 170) (sex . M) (univ . umd) (year . 1998) (age . 23) (salary . 25000) (homestate . iowa) (married . n) (kidnames . nil) ))

(dbstore george ( (weight . 215) (height . 190) (sex . M) (univ . mit) (year . 1984) (age . 22) (salary . 45000) (homestate . maryland) (married . y) (kidnames . nil) ))

(dbstore nick ( (weight . 160) (height . 176) (sex . M) (univ . upenn) (year . 2000) (age . 20) (salary . 20000) (homestate . pennsylvania) (married . n) (kidnames . nil) ))

(dbstore adam ( (weight . 158) (height . 160) (sex . M) (univ . nil) (year . 1994) (age . 25) (salary . 30000) (homestate . vriginia) (married . y) (kidnames . (john linda)) ))

(dbstore david ( (weight . 145) (height . 150) (sex . M) (univ . berkeley) (year . 1969) (age . 21) (salary . 70000) (homestate . md) (married . n) (kidnames . nil) ))

(dbstore anne ( (weight . 100) (height . 150) (sex . F) (univ . vtech) (year . 2001) (age . 19) (salary . 15000) (homestate . virginia) (married . y) (kidnames . (gary roger) ) ))

(dbstore lise ( (weight . 170) (height . 170) (sex . F) (univ . stanford) (year . 1980) (age . 30) (salary . 55000) (homestate . california) (married . n) (kidnames . nil) ))

(dbstore michelle ( (weight . 110) (height . 176) (sex . F) (univ . gtech) (year . 1975) (age . 18) (salary . 60000) (homestate . georgia) (married . y) (kidnames . (robert)) ))

(dbinsert john lieutenant)
(dbinsert george colonel)
(dbinsert nick private)
(dbinsert adam lieutenant)
(dbinsert david general)
(dbinsert anne private)
(dbinsert lise colonel)
(dbinsert michelle general)
(dbinsert 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

(dbmodify john salary 27000)

(dbremove noname general)
;Result: nil

(dbremove lise colonel)

(dbremove adam lieutenant)
(dbinsert 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
