Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #20358

Re: SP-Forth: reduce or fold a list

From "Charles Childers" <crc@retroforth.org>
Newsgroups comp.lang.forth
Subject Re: SP-Forth: reduce or fold a list
Date 2013-03-06 16:42 -0500
Organization ForthWorks
Message-ID <op.wtjnwvkt6ef20b@denney-2466a6df> (permalink)
References <kh80t5$ec8$1@dont-email.me>

Show all headers | View raw


Parable:

"Build an array of 9999 integers"
[ #1 #9999 range-expand ] array-from-quote

"Get the length of the array"
[ array-length ] sip

"And sum them"
#0 [ + ] array-reduce

This will work in Retro in the near future: I'm currently rewriting the  
array
functions to make them more flexible and backporting functionality from  
Parable
in the process.

-- crc

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

SP-Forth: reduce or fold a list "WJ" <w_a_x_man@yahoo.com> - 2013-03-06 18:11 +0000
  Re: SP-Forth: reduce or fold a list "Charles Childers" <crc@retroforth.org> - 2013-03-06 16:42 -0500
  Re: SP-Forth: reduce or fold a list "WJ" <w_a_x_man@yahoo.com> - 2013-03-06 23:24 +0000
    Re: SP-Forth: reduce or fold a list "WJ" <w_a_x_man@yahoo.com> - 2013-03-06 23:50 +0000

csiph-web