At Mon, 14 Mar 2016 19:59:51 -0400, Tony Garnock-Jones wrote:
> On 03/14/2016 07:53 PM, Matthew Flatt wrote:
> > [fixnum eqness is guaranteed by the docs.
> > [...] And keywords [are also guaranteed].
> > [...] [And] Booleans, void, and characters with a scalar value under 256.
> >
> > Opaque
At Mon, 14 Mar 2016 19:43:51 -0400, Tony Garnock-Jones wrote:
> Can I rely on the truth of the following:
>
> (implies (and (fixnum? x) (fixnum? y) (= x y))
>(eq? x y))
>
> ?
Yes, that's guaranteed by the docs.
> I know I can rely on something similar for symbols.
And keywords.
Hi all,
Can I rely on the truth of the following:
(implies (and (fixnum? x) (fixnum? y) (= x y))
(eq? x y))
?
I know I can rely on something similar for symbols.
What other sorts of values can I rely on eq? being an appropriate
equivalence predicate for?
Tony
--
You received
Almost every time I've created a custom input port, I've run up against the
rule: "The read-in procedure must not block indefinitely." And each time,
I've either:
- ignored it (with the suspicion that I've just written code that can block
the whole process, though I've never actually verified
I have looked up a N-queens program I made a long time ago. It finds all
solutions.
My timings are faster I think. I need 2 seconds (in DrRacket) for N=12.
14200 solutions of which 1787 are not symmetrically equivalent.
If you want I send you the code privately. 83 lines.
Finding the solutions
Yes, lambda expression have an implicit begin in the body.
> (begin . (1 2 3))
3
> (begin (1 2 3))
application: not a procedure;
expected a procedure that can be applied to arguments
given: 1
arguments...:
Here (begin . (1 2 3)) is the same as (begin 1 2 3).
The
Does that mean that lambda expressions have an implicit (begin …) block in them?
(begin ((displayln 1) (displayln 2) (displayln 3))) leads to an error
(begin . ((displayln 1) (displayln 2) (displayln 3))) displays to 1 2 3
Thank you for the detailed explanation I think I get it now.
> On 13
This is a bit off-topic (though it is about N-queens) but I've long wanted to
ask people if an idea I had once is a well-known one. It once occurred to me
that solutions to N-rooks can be viewed as linear transformations that
correspond to permutations of a vector. So, then I wondered to what
8 matches
Mail list logo