Re: Combining Complement and Not

2012-11-06 Thread James MacAulay
I'd say the simplest answer is just that functions *are* values, they are never logical-false, and (not) is based on logical falseness. Giving (not) a special case for functions would make it less composable by trying to make it do more. -James On Tuesday, 6 November 2012 14:55:53 UTC-5, Char

Re: Combining Complement and Not

2012-11-06 Thread Charles Comstock
I understand that, hence the example being to check if the value was a function, since returning false from not'ing a function didn't make sense to me. The change I was inquiring about applied to your example would be; (filter (fnot even?) [1 2 3 4 5 6 7]) => (1 3 5 7) (filter fnot [true false t

Re: Combining Complement and Not

2012-11-06 Thread Stathis Sideris
The difference between not and complement is that not takes a *value* and produces a new *value* which is true if the original was false (and vice versa) while complement takes a *function* and produces a new *function *which returns true in the cases where the original function would return fal

Combining Complement and Not

2012-11-05 Thread Charles Comstock
Hi All, I quite like Clojure but have been confused from time to time on particular design choices. I find understanding the root cause of these decisions helps to understand the language better. As example, the fact that complement and not are separate functions has been puzzling me for a bit