[racket-users] Re: How to return summary from the inner loop?

2015-07-10 Thread Pekka Niiranen
Thanks Sir, This was exactly what I tried to reason. It never occured to me that parameter failure can be used in both for/fold -constructs. About the problem (Stephen): value-list: '(5, 15, 25) low-list: '(1, 11, 21) high-list: '(10, 20, 30) I need to check the following 9 cases: LV

Re: [racket-users] Re: How to return summary from the inner loop?

2015-07-10 Thread Stephen Chang
I understand now. I still claim that an (explicit) inner loop is not needed: (define (validate-ranges5 value-list low-list high-list) (for*/fold ([failures 0]) ([(lo hi) (in-parallel low-list high-list)] [v value-list] #:when ( lo v hi)) (printf

Re: [racket-users] Re: How to return summary from the inner loop?

2015-07-10 Thread Pierpaolo Bernardi
On Fri, Jul 10, 2015 at 11:40 PM, Pekka Niiranen pekka.niira...@pp5.inet.fi wrote: Thanks Sir, This was exactly what I tried to reason. It never occured to me that parameter failure can be used in both for/fold -constructs. I must fix once again my code. Sigh. I fixed a mistake, and renamed