On Sat, Jun 4, 2016 at 1:23 AM, Gustavo Massaccesi <gust...@oma.org.ar> wrote:
>  > [...] I saw in the docs that case specifically mentions it can
> distribute in log(n) time [...]

> but both expand to a bunch of nested if, nothing fancy that may run in
> O(log(N)).
> (I don't expect that it has a smarter implementation for bigger N.)

It indeed has some smarts.  Try expanding the following:

#lang racket

(lambda (x)
  (case x
    ((1) 1)
    ((2) 1)
    ((3) 1)
    ((4) 1)
    ((5) 1)
    ((6) 1)
    ((7) 1)
    ((8) 1)
    ((9) 1)
    ((10) 1)
    ((11) 1)
    ((12) 1)
    ((13) 1)
    ((14) 1)
    ((15) 1)
    ((16) 1)
    ((17) 1)
    ((18) 1)
    ((19) 1)
    ((20) 1)
    ))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to