[squeak-dev] isPrime is now Primo
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...
More information about the Squeak-dev