Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Max Penet
Hello, I am trying to understand the rationale behind the current implementation of some-fn and every-pred, there seems to be a couple of odd things, or maybe that is just me misunderstanding their doc. user ((every-pred (fn [_]))) true user ((some-fn (fn [_]))) nil Shouldn't the first

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Tassilo Horn
Max Penet m...@qbits.cc writes: user ((every-pred (fn [_]))) true user ((some-fn (fn [_]))) nil Shouldn't the first example return false? since the first function always returns nil? No. ((every-pred a b c) o1 o2 ...) returns true if all predicates a, b, and c return true for all given

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Max Penet
user (every? identity []) true I think I understand now, this might be to match the behavior of every?. Max On Thursday, October 25, 2012 12:31:57 PM UTC+2, Max Penet wrote: Hello, I am trying to understand the rationale behind the current implementation of some-fn and every-pred, there

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Max Penet
On Thursday, October 25, 2012 12:49:32 PM UTC+2, Tassilo Horn wrote: Max Penet m...@qbits.cc writes: user ((every-pred (fn [_]))) true user ((some-fn (fn [_]))) nil Shouldn't the first example return false? since the first function always returns nil? No. ((every-pred

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Tassilo Horn
Max Penet m...@qbits.cc writes: Hi Max, user ((some-fn) no-matter-what) false user ((every-pred) no-matter-what) true e.g. (some-cn) was equivalent to (constantly false) and (every-pred) was equivalent to (constantly true). Yes I understand that, the proposal was just to avoid

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Tassilo Horn
Tassilo Horn t...@gnu.org writes: user ((some-fn) no-matter-what) false user ((every-pred) no-matter-what) true e.g. (some-cn) was equivalent to (constantly false) and (every-pred) was equivalent to (constantly true). Yes I understand that, the proposal was just to avoid exceptions

Re: Questions about some-fn and every-pred (possible bug, and improvements)

2012-10-25 Thread Max Penet
Thanks, perfect, I had prepared a patch that was identical. On Thursday, October 25, 2012 2:11:44 PM UTC+2, Tassilo Horn wrote: Tassilo Horn ts...@gnu.org javascript: writes: user ((some-fn) no-matter-what) false user ((every-pred) no-matter-what) true e.g. (some-cn) was