Think about Loose Coupling | |
PerlMonks |
Re^3: Perl can do it, take 1 (sentence generation)by BrowserUk (Patriarch) |
on Jun 18, 2005 at 09:09 UTC ( [id://467965]=note: print w/replies, xml ) | Need Help?? |
Like I said, probably a step too far, but I was trying to stay true to the Lisp original. If the intent is to completely Perlify the algorithm, then you probably wouldn't use the listp() abstraction (and it certainly wouldn't be called that:). If Perl's if then elsif else construct worked like those in Haskell or SQL, you could do
The nearest I could get is the nested ternaries. I also tried to code the cond macro, and got pretty close. It follows all the right paths, but implementing rewrite is much harder, and the values don't filter up without that.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
In Section
Meditations
|
|