I was under the impression that recursive controlled Lambda was near impossible 
to write.

here an example for factorial:


      fact←{⍎↑(⍵>2)↓⌽ '⍵ × fact ⍵-1' '1⌈⍵'}

      fact 10
3628800
      fact 2
2
      fact 1
1
      fact 0
1
      fact 14
87178291200
      !14
87178291200


This IDIOM, from the 80's, can do that. What is in (...) is the condition and 
it will execute
the first statement if true, else the second one.

for your eyes,

Xtian.

Reply via email to