[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ANN] hyper search engine 0.2
From: |
Amirouche Boubekki |
Subject: |
Re: [ANN] hyper search engine 0.2 |
Date: |
Sun, 19 Jun 2016 20:55:08 +0200 |
User-agent: |
Roundcube Webmail/1.1.2 |
On 2016-06-19 11:49, Amirouche Boubekki wrote:
```
(define* ((xor* a b) uid)
(if (procedure? a)
(if (procedure? b)
((xor* (a uid) (b uid)) uid)
((xor* (a uid) b) uid))
(if (procedure? b)
((xor* a (b uid)) uid)
(xor a b))))
```
That procedure is buggy, since we can assume that (a uid) returns a
boolean, there is no need for the extra xor* call.
The following does what is expected thanks to ijp:
(define ((xor* . fs) uid)
(fold logxor 0 (map (lambda (f) (if (procedure? f) (f uid) f)) fs)))
--
Amirouche ~ amz3 ~ http://www.hyperdev.fr