Post Reply 
Conversion: Algebraic - Polish - Reverse Polish - LISP ?
11-03-2024, 03:44 PM
Post: #14
RE: Conversion: Algebraic - Polish - Reverse Polish - LISP ?
(11-03-2024 02:22 PM)Thomas Klemm Wrote:  I tend to forget these details. Thanks for reminding me.
Code:
«
  IF DUP TYPE 9 SAME
  THEN OBJ→ → f
    « →LIST 1 :: →PN DOSUBS f SWAP +
    »
  END
»

I tend to obsess over these details. Smile Going even further, for the 49 and 50 with ListExt we can use LMAP instead of DOLIST/DOSUBS when the number of arguments is 1. We now have

Code:

\<<
  IF DUP TYPE 9. SAME
  THEN OBJ\-> \-> f
    \<< \->LIST
      :: \->PN LMAP
      f SWAP +
    \>>
  END
\>>

at 74.5 bytes.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Conversion: Algebraic - Polish - Reverse Polish - LISP ? - John Keith - 11-03-2024 03:44 PM



User(s) browsing this thread: 1 Guest(s)