>>>>> "Slava" == Slava Pestov <[EMAIL PROTECTED]> writes:

Slava> FWIW, fry is documented now.

This is very neat!

But I am surprised by the behaviour of "_"; I would have imagined that
it would have skipped (and kept) the corresponding data on the stack
at frying time, to keep the "natural" order.

The existing

  { 10 20 30 } 1 '[ , _ / ] map

example would then be written as

  1 { 10 20 30 } '[ , _ / ] map

which seems to me more consistent with the order of "/" arguments.

  Sam

PS/  I have just needed this kind of construct 5 minutes ago when
     solving a project Euler problem, but an added swap makes it ok of
     course.  I wanted to set several keys in a hash-table to the same
     value, and would have loved to keep the same order as "set-at" by
     writing:
       : set-group ( value keys hash -- ) '[ , _ , set-at ] each ;

PPS/ The "{ 8 13 14 27 } [ even? ] 5 [ @ dup , ? ] map" example needs
     a "'[" in place of the last "[".
-- 
Samuel Tardieu -- [EMAIL PROTECTED] -- http://www.rfc1149.net/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to