[stack] recursive combinators in other languages

"Rahul" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
I recently discovered that Nial (learning array languages because of 
this list :) ) recursive transformers were remarkably similar to the 
joy recursive combinators.

The definition of factorial in Nial is given by

factorial is recur [ 0 =, 1 first, pass, product, -1 +]

the arguments to 'recur' are:

test:checks that the argument meets an end condition,
endf:is applied to the end argument before starting to build the 
result,
parta:left value computed from the argument and stacked,
joinf:combines the left and right values as the recursion unwinds, and
partb:gives the value to be recurred on to produce the right value.

Are there other languages that use the same form?

Rahul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.