[plt-scheme] (no subject)
On Jan 21, 2006, at 5:07 AM, igor denisov wrote:
> Hello there
>
> Can somebody help me to figure out what is wrong with these codes.
> DrScheme V208
> Language: Beginning Student.
>
> ;; hours->wages : list-of-numbers -> list-of-numbers
> ;; to create a list of weekly wages from a list of weekly hours (alon)
> (define (hours-wages alon)
> (cond
> ((empty? alon) empty)
> (else (cons (wage (first alon)) (hours-wages (rest alon))))))
>
> ;; wage : number -> number
> ;; to compute the total wage (at $12 per hour)
> ;; of someone who worked for h hours
> (define (wage h)
> (cond
P.S. Why are you using cond for a plain number? -- Matthias