[squeak-dev] isPrime is now Primo

Chris Cunnington smalltalktelevision at gmail.com
Tue Mar 9 22:34:18 UTC 2010

Imagine yourself staring at this for long periods of time:

amb := Amb new.

results := amb allValues:
[x := amb oneOf: (1 to: 10).
amb assert: (x > 5).

You say to yourself that it should be easy to change the block to (x
isPrime) instead of (x >5).
But no...in 3.10.2 you get an error. You panic. This is proof of some
mystery about continuations you don't grok.
Then you read the implementation in 3.10.2 and it throws an error if it
encounters a 1.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100309/80fd6bb7/attachment.htm

More information about the Squeak-dev mailing list