Hi all,
I added a word 'glue' to sequences:
: glue ( seq1 seq2 seq3 -- newseq )
swap 3append ;
Instead of:
"a" "b" "," swap 3append .
"a,b"
you can do:
"a" "b" "," glue .
"a,b"
The third parameter "glues" the other two sequences together.
The other sequences word is called "surround":
: surround ( seq1 seq2 seq3 -- newseq )
swapd 3append ;
Instead of:
"paren-me" "(" ")" swapd 3append .
"(paren-me)"
you can do:
"paren-me" "(" ")" surround .
"(paren-me)"
The last word, "retry", is a variation on attempt-all that takes an
integer instead of a sequence. This word tries a quotation n times,
stopping early if it returns true and retrying if it returns false or
throws an exception. The quotation is expected to have side-effects
or it's not very useful.
I updated the usages for the change.
Doug
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk