Post Reply 
HP 50g List function question
09-10-2017, 07:21 AM (This post was last modified: 09-10-2017 08:32 AM by Gilles59.)
Post: #3
RE: HP 50g List function question
(09-09-2017 10:47 PM)Andres1 Wrote:  {a, b, c} to {a, a+b, a+b+c}.

Hi, with Gopher List Library :

Code:
  « + » Scanl1

without external Library :

Code:
 1. 
 «
  CASE    
   NSUB 1. == THEN DUP END    @ special case first item : no +
   NSUB ENDSUB == THEN + END  @ special case last item : no DUP
   + DUP                      @ All other cases
  END
 »
DOSUBS
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP 50g List function question - Andres1 - 09-09-2017, 10:47 PM
RE: HP 50g List function question - pier4r - 09-10-2017, 07:18 AM
RE: HP 50g List function question - pier4r - 09-10-2017, 09:40 AM
RE: HP 50g List function question - Gilles59 - 09-10-2017 07:21 AM
RE: HP 50g List function question - pier4r - 09-10-2017, 07:46 AM
RE: HP 50g List function question - DavidM - 09-10-2017, 03:28 PM
RE: HP 50g List function question - Juan14 - 09-10-2017, 07:41 PM



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