Paul, your function solve returns a set of solutions, but there is nothing
on the program that seems to rely upon being able to quickly test whether a
particular solution is in such a set. Returning a sequence from solve is
much faster, since it avoids the PersistentHashSet hash collision issue
entirely.
Just replace #{#{}} with [#{}], and remove the call to 'set' in solve.
Andy
On Wed, Oct 23, 2013 at 9:18 AM, Paul Butcher <[email protected]> wrote:
> On 23 Oct 2013, at 17:06, Andy Fingerhut <[email protected]> wrote:
>
> I have instrumented a copy of Paul's Clojure program to print the hash
> code of all of the solutions in the set returned by solve, and there are
> *many* pairs of solutions that have identical hash values
>
>
> Aha! The smoking gun :-)
>
> Very many thanks, Andy.
>
> --
> paul.butcher->msgCount++
>
> Snetterton, Castle Combe, Cadwell Park...
> Who says I have a one track mind?
>
> http://www.paulbutcher.com/
> LinkedIn: http://www.linkedin.com/in/paulbutcher
> MSN: [email protected]
> AIM: paulrabutcher
> Skype: paulrabutcher
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.