I was solving this exercise from htdp , its been quite some days since i wrote a program in scheme .I am getting this error which i am not able to sort out .Can someone please help me with this.<br><br>;data definition <br>
(define-struct child (father mother name date eyes))<br>;oldest generation <br>(define Carl (make-child empty empty 'Carl 1926 'green))<br>(define Bettina (make-child empty empty 'Bettina 1926 'green))<br>
<br>;; Middle Generation:<br>(define Adam (make-child Carl Bettina 'Adam 1950 'yellow))<br>(define Dave (make-child Carl Bettina 'Dave 1955 'black))<br>(define Eva (make-child Carl Bettina 'Eva 1965 'blue))<br>
(define Fred (make-child empty empty 'Fred 1966 'pink))<br><br>;; Youngest Generation: <br>(define Gustav (make-child Fred Eva 'Gustav 1988 'brown))<br><br><br>;A family-tree-node (short: ftn) is either<br>
<br> ; 1.<br><br> ; empty; or<br> ;2.<br><br> ; (make-child f m na da ec)<br> ; where f and m are ftns, na<br> ;and ec are symbols, and da is a number.<br>;contract of count-persons ftn(family tree node) -> number <br>
;Purpose :This function takes a family tree node and computes the number of persons in that node<br>;examples empty -> 0 ,carl ->1 , bettina -> 1 , adam , dave , eva -> 3 , fred->1 , gustav-> 5<br>;template(define count-persons (lambda (ftn) (cond [(empty? ftn )][else (count-persons (child-father ftn)) (count-persons (child-mother ftn)) (child-name ftn) (child-date ftn) (child-eyes ftn)])))<br>
(define (count-persons a-ftree)<br> (cond<br> [(empty? a-ftree) 0]<br> [else ((symbol? (child-name a-ftree)) (+ 1 (count-persons(or (child? (child-father a-ftree) ) (child? (child-mother a-ftree) )))))])) <br>
<br>(count-persons Fred)<br><br><br><br><br>function call: expected a name after an open parenthesis, but found something else<br><br><br>Thanks,<br>Aditya<br>