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


Groups > comp.lang.postscript > #2087

Re: map and higher order functions

From Carlos <angus@quovadis.com.ar>
Newsgroups comp.lang.postscript
Subject Re: map and higher order functions
Date 2014-11-01 23:58 +0100
Organization A noiseless patient Spider
Message-ID <20141101235848.787a958f@samara.DOMA> (permalink)
References <20141030172728.0983c6bc@samara.DOMA> <859e543c-067a-443f-9b50-922768851e5b@googlegroups.com>

Show all headers | View raw


[Ross Presser <rpresser@gmail.com>, 2014-10-30 20:30]
> On Thursday, October 30, 2014 12:27:49 PM UTC-4, Carlos wrote:
> > How would you implement map and other higher order functions
> > (procedures taking one or more procedures)?
> > 
> > Especially the part when the procedure is to be run, and you must
> > clear the stacks from your working elements.
> 
> 
> This might be of some interest:
> http://codereview.stackexchange.com/questions/12249/concatenative-postscript-library
> 
> I do not know if it does anything to clear stacks, but it definitely
> defines /map and is along the same lines as your attempt.

It's quite elegant how he defines it, unfortunately it uses the stack to
accumulate the result, so the passed proc can't use it.
-- 

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


Thread

map and higher order functions Carlos <angus@quovadis.com.ar> - 2014-10-30 17:27 +0100
  Re: map and higher order functions ken <ken@spamcop.net> - 2014-10-30 16:57 +0000
    Re: map and higher order functions Carlos <angus@quovadis.com.ar> - 2014-10-30 19:55 +0100
      Re: map and higher order functions ken <ken@spamcop.net> - 2014-10-31 12:17 +0000
  Re: map and higher order functions Ross Presser <rpresser@gmail.com> - 2014-10-30 20:30 -0700
    Re: map and higher order functions Carlos <angus@quovadis.com.ar> - 2014-11-01 23:58 +0100
  Re: map and higher order functions luser- -droog <mijoryx@yahoo.com> - 2014-10-30 22:56 -0700
    Re: map and higher order functions Carlos <angus@quovadis.com.ar> - 2014-11-02 00:15 +0100
      Re: map and higher order functions luser- -droog <mijoryx@yahoo.com> - 2014-11-15 00:43 -0800
        Re: map and higher order functions Carlos <angus@quovadis.com.ar> - 2014-11-16 01:37 +0100
          Re: map and higher order functions luser- -droog <mijoryx@yahoo.com> - 2014-11-21 00:17 -0800
          Re: map and higher order functions luser- -droog <mijoryx@yahoo.com> - 2015-02-27 00:59 -0800

csiph-web