>
> Was wondering if there could be a variation of "for i = 0 up to n", when n
> is unknown.
>
> Named it "index-pump".
>
> Instead of "looping over a body of code", we are "index-pumping a
> function".
>
> : index-pump ( quot -- m )
>     1 swap [ dup ] prepose [ 1 + ] while ; inline
>

Er, seems like this already exists ...

http://docs.factorcode.org/content/word-iterate%2Cproject-euler.203.private.html
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to