Hi Laurent, Am 10.05.2009 um 07:19 schrieb Laurent PETIT:
No problem, but you can still consider (for the definition of the function) the equivalent higher-order version I provided later in the my post (you didn't answer to this one):(defn repeatedly-while [no-arg-pred f] (take-while (fn [ _ ] (no-arg-pred) f)) whose usage is the same as Meikel's one,
This is not equivalent to my version. The calling site looks the same, but it still consumes one element of the seq before evaluating the predicate. That is the way take-while works. But it doesn't help in the given reader example, since you read before checking, whether the reader is actually ready... Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature