Hi

In "Factor Philosophy", slava writes: "Imperative programming and indexed
loops are almost always not the most idiomatic solution."

I've implemented this puzzle (
http://mindyourdecisions.com/blog/2013/04/22/100-light-bulbs-puzzle/ )
using a side-effecting function: http://paste.factorcode.org/paste?id=2914

The words do-switching and toggle-switches implement the equivalent of a
nested loop.

Without using recursion, counted for loops or side-effecting functions,
what is an idiomatic way of implementing this nested iteration?

Loryn Jenkins
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to