tags:

views:

336

answers:

0

If you know LISP, could you please change this into C-based sytnax for me (ie. C/C++/C#/Java ..etc)?

(let ((g (* 2 (or (gethash word good) 0)))
      (b (or (gethash word bad) 0)))
   (unless (< (+ g b) 5)
     (max .01
          (min .99 (float (/ (min 1 (/ b nbad))
                             (+ (min 1 (/ g ngood))   
                                (min 1 (/ b nbad)))))))))

Thanks

Source: http://www.paulgraham.com/spam.html