Recursion and while loops in Factor

October 11th, 2007 by Samuel Tardieu

Tonight, I was willing to create a while construct in Factor taking two items on the stack:

a quotation to execute when the test is true
a test quotation

For example, I wanted to be able to find the smallest power of two greater than or equal to an arbitrary number (here 34098) by doing:

1 [ 2 * […]

Factor: a stack-based programming language

January 18th, 2007 by Samuel Tardieu

As you may already know, I’m a big fan of stack-based languages such as Forth, functional languages such as Haskell and reflexive languages such as Smalltalk. You can imagine how happy I was when I discovered Factor a few days ago: it combines all those aspects.
Today, a friend sent me someone email signature and asked […]


Creative Commons License