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


Groups > comp.lang.postscript > #3055

Re: func def

Newsgroups comp.lang.postscript
Date 2017-05-05 06:56 -0700
References <82292d95-ba9b-40ed-b7e7-c4f396eedc13@googlegroups.com> <1l2tgxlueau8f.1g6qpkrpfp92p$.dlg@40tude.net>
Message-ID <ef2ea61a-4b3a-422f-9045-493cbc4e4d4d@googlegroups.com> (permalink)
Subject Re: func def
From luser droog <luser.droog@gmail.com>

Show all headers | View raw


On Friday, May 5, 2017 at 8:47:36 AM UTC-5, tlvp wrote:
> On Fri, 5 May 2017 00:18:19 -0700 (PDT), luser droog wrote:
> 
> > /curry { /exec cvx 3 array astore cvx } def
> > /combine { /exec cvx exch 1 index 4 array astore cvx } de
> > /reverse-array { [ exch dup length 1 sub -1 0 { 2 copy get 3 1 roll pop } for pop ] } def
> > /args { dup length dict begin {exch def} forall } def
> > /func { exch reverse-array //args curry exch combine {end} combine } def
> > %/f {x y z}{  x y add z mul  } func def 1 2 3 f = %=> 9 
> > 
> > 
> > Any questions?
> 
> Yes, please. The "de" at the end of line 2 ... should it be "def"?

Yes. Emacs in the dark.

> And the "%=>" late in the last line ... does what?

Just illustrating the output if the line were uncommented.

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


Thread

func def luser droog <luser.droog@gmail.com> - 2017-05-05 00:18 -0700
  Re: func def tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-05-05 09:47 -0400
    Re: func def luser droog <luser.droog@gmail.com> - 2017-05-05 06:56 -0700
      Re: func def tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-05-06 03:50 -0400
        Re: func def luser droog <luser.droog@gmail.com> - 2017-05-06 13:01 -0700
          Re: func def tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-05-06 17:58 -0400
        Re: func def luser droog <luser.droog@gmail.com> - 2017-05-06 20:13 -0700
          Re: func def tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-05-07 02:03 -0400
  Re: func def luser droog <luser.droog@gmail.com> - 2017-06-22 23:23 -0700

csiph-web