6.001, Spring Semester, 2005--Quiz I Part 3:(20 points) Now suppose that we want to retrieve entries from the dat abase that satisfy cert ain constraint s For example, we might want to get all the entries of people wit h the posit might want to get the entries of people whose first name is"Jane", or all the entries of people with aries bet ween 25000 and 50000. Remember our procedure (define (filter pred lst) ond ((null? lst) nil) ((pred (car lst))(cons (car lst) (filter pred (cdr lst)))) (else (filter pred (cdr lst))))) Question 9: We want a way of get ting entries from the dat abase with a particular first name (where by first name, we mean the first of the "given"names, not the family name). You may assume that every entry in the database has at least one given name. You may also find the procedure string=?, which compares two strings, to be useful Complete the follow ing code so that, for example (filter (called-by "jane") sampledata) Value: (((doe""jane ""elizabeth")38000"assistant") (define (called-by Question 10: Suppose we want to find all the people who have salaries at least as large as a specified amount, and who hold a particular posit ion (filter (salary-and-position 60000 hacker")sampledat a) Value: ((("jones""anne""marie""heather")60000"hacker")) Complete the following code fragment (define (salary-and-position minimum posn) ! - & & * - - . & * 1& * &&/ &&" >' - * - * & -* * & B*0B' - * - * & -*& ?& & BDB' * & -* && 1- ()### )####" 51 3 +- $ < - -/ & * 1& -* ?& @-* 1/ ?& ' - * ?& * B.B &' * / C" / && * ./ / * 1& *& & . " / & ? * ' -** & - &&' 1 & " * - & *' >' !#! )*+, !! !#! !%"! &$$$ !! & - - ? * -* *. && & & & &? ' -* * &" $$$$ !"! )*+, !#! !! !! !""! $$$$ !"! * - 3 +