bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Recursive Lambda


From: Kacper Gutowski
Subject: Re: [Bug-apl] Recursive Lambda
Date: Wed, 6 Jul 2016 03:10:59 +0200

I would argue that using fixed strings and idiomatic construction to
select one to eval is less complex than conditionally concatenating
fragments.

Anyway, since other languages conditioned me to avoid eval like the
plague and power operator can also be used to construct arbitrary
control flow, I would try doing it this way:

      fact←{{⍵ × fact ⍵-1}⍣(⍵>2)⊢1⌈⍵}

If you need separate else branch, though, the idiom Xtian posted is
probably the clearest way to do it.

-k



reply via email to

[Prev in Thread] Current Thread [Next in Thread]