On Tue, Dec 9, 2008 at 8:34 PM, Slava Pestov <[EMAIL PROTECTED]> wrote: > Try doing that in Lisp or Haskell!
Since you asked :-) Haskell's syntax actually makes this work quite nice enough to get pretty close. Given a function 'while' in Haskell: while s pred body tail And a function doo ('do' is a reserved word I think): doo while s pred body = while (body s) pred body We can do: doo while s pred body tail Which calls the body first like the factor example. This is because the latter is (do (while) s pred body) not (do (while s pred body)) using Haskell's evaluation rules. Chris. -- http://www.bluishcoder.co.nz ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk