[plt-scheme] Re: Need help in converting simple code into Scheme.

From: Eric Hanchrow (offby1 at blarg.net)
Date: Sun Oct 1 11:20:52 EDT 2006

(define (execute score)
    (cond ((< score 1) 1)
          ((<= 1 score 2) 2)
          (else 3)))
> (execute 0)
1
> (execute 1)
2
> (execute 2)
2
> (execute 3)
3
> (execute 10)
3
> 
-- 
He who refuses to do arithmetic is doomed to talk nonsense.
        -- John McCarthy



Posted on the users mailing list.