2009/5/10 Mark Reid <mark.r...@gmail.com>

>
> Hi Laurent,
>
> On May 10, 5:15 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> > So if you want to call it with a no-arg "predicate", you must adapt it :
> >
> > (repeatedly-while (fn [ _ ] (no-arg-pred)) f)
> > instead of
> > (repeatedly-while no-arg-pred f)
>
> I think that this is too convoluted a calling pattern. For my
> purposes, my preference is for the amended `repeatedly-while` function
> Miekel suggested.



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,


Regards,

-- 
Laurent




>
>
> Thanks,
>
> Mark.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to