[racket] strange interference with prompt, correcture

From: J. Ian Johnson (ianj at ccs.neu.edu)
Date: Fri Dec 13 11:45:10 EST 2013

After you also change your list-ref usage, since that's also erroneous. Perhaps you meant (lambda (ix) (set-member? x ix))
-Ian
----- Original Message -----
From: "Sam Tobin-Hochstadt" <samth at cs.indiana.edu>
To: 1 at depikt.net
Cc: "users" <users at racket-lang.org>
Sent: Friday, December 13, 2013 10:51:31 AM GMT -05:00 US/Canada Eastern
Subject: Re: [racket] strange interference with prompt, correcture

I'm pretty sure the problem is that `racket/control` exports a binding
named `set`, which is shadowing the regular binding of `set`.  If you
hide that binding, I think things will work better.

Sam

On Fri, Dec 13, 2013 at 10:29 AM,  <1 at depikt.net> wrote:
>
> Hello,
>
> reducing the original code to the example
> for containing the problem, i've committed a
> slip. The example code should be:
>
> (define (·first occurrences x L)
>      (define R (filter (λ(ix) (set-member? (list-ref L ix) x)) L))
>        (take R (min (length R) occurrences)))
> (print (·first 5 (set #\q #\a #\h) (string->list "this is a sequence.")))
>
> (prompt (+ 2 (abort 5)))
>
> (with 'string->list added). It
> is failing (in DrRacket) the same way:
>
>
> call-with-continuation-prompt: contract violation
>    expected: continuation-prompt-tag?
>    given: #\q
>    argument position: 2nd
>    other arguments...:
>     #<procedure>
>     #<procedure:...cket/control.rkt:208:45>
>
> The 'prompt line alone, taken from the
> reference, is working perfectly, as in some
> other environments also. What is wrong here ?
>
> Regards, Joost Behrends
>
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

____________________
  Racket Users list:
  http://lists.racket-lang.org/users


Posted on the users mailing list.