Reputation: 650
I have this code in Scheme:
(define (calculate-mark MidTerm FinalExam Assignment Clicker)
(lambda(MidTermWeight) (/(* 3 MidTerm)10)
(display MidTermWeight))
)
Now when I calling this function by:
(calculate-mark 10 10 10 10)
It is showing this:
#<procedure>
Why it is not displaying any result?
Upvotes: 1
Views: 221
Reputation: 53871
In Scheme, you can define a function like this
(define (foo bar)
...)
or
(define foo
(lambda (bar)
...))
But you've done both so you're procedure returns another procedure: (lambda (midtermWeight)...
. You'll have to call it again with the midtermweight to get a result.
Upvotes: 4