[racket] Order of Operations - Getting the brackets.
What I am having trouble navigating is the brackets.
Simply in normal math what I am trying to do is
(people * ticket price)-((number of shows * 20)+(people * cost per person))
Contrcat : total profit : attendees performance -> number
;; Purpose to calculate total profit of a theatre per show
;;Example: (total profit 20 1) should produce $70
;;Defintion: ( define (- profit cost))
(* patrons 5( - (* patrons 0.5(+ (* shows 20)))))
(define (patrons p)
;p a number
...
)
(define (shows s)
;s a number
...
)
(define (total_profit p s)
(* p 5( - (* p 0.5(+ s 20)))))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101222/b4564f56/attachment.html>