Re: [racket-users] Re: Thinking in scheme / racket

2019-07-11 Thread Bob Heffernan
On 19-07-11 00:44, Maciek Godek wrote: > I also think that functional programming perhaps seems to make little sense > in a small scale, but as your programs grow large, it becomes increasingly > important. Maciek, You know, I think you might be right and I think this might be at the root of my

Re: [racket-users] Re: Thinking in scheme / racket

2019-07-11 Thread Bob Heffernan
On 19-07-11 09:31, James Geddes wrote: > Indeed, I would have thought that the calculation time would be > entirely dominated by the test for primality, and especially what > happens once the candidate primes are bigger than 2^64 and can no > longer be represented by a single word. James, I assum

Re: [racket-users] Re: Thinking in scheme / racket

2019-07-10 Thread Bob Heffernan
On 19-07-10 02:46, Maciek Godek wrote: > A while ago, I wrote a booklet which used almost the same problem to > introduce to, what you called nicely in the title of this thread, "thinking > in Scheme", so if you're interested, you may want to check out the first > chapter ("Introduction"): Maci

Re: [racket-users] Thinking in scheme / racket

2019-07-09 Thread Bob Heffernan
Daniel, Thank you. The piece of the puzzle I was missing was in-value. Your version is much easier to read than mine. It is also easy to modify it to get a list of the primes that occur, which is nice. Regards, Bob -- You received this message because you are subscribed to the Google Groups

[racket-users] Thinking in scheme / racket

2019-07-09 Thread Bob Heffernan
ound) ; Primes of the form 2^n+3 (count-primes-in-seq (λ (n) (+ (expt 2 n) 3)) bound) Regards, Bob Heffernan -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from

Re: [racket-users] Question about style

2018-08-16 Thread Bob Heffernan
On 18-08-16 11:43, 'Paulo Matos' via Racket Users wrote: > I really, really don't like nesting and a few years ago adopted the > style of internal defines. It makes for much more readable code: > > (define (foo x) > (define y (f x)) > (define z (g y)) > (define p (h z)) > > (bar p)) Than

[racket-users] Question about style

2018-08-11 Thread Bob Heffernan
uot;. On the other hand, it often helps readability. It might be, of course, that both versions amount to the same thing after the interpreter has been at them. Thanks and regards, Bob Heffernan -- You received this message because you are subscribed to the Google Groups "Racket Users&quo