Re: Combining @ and [*] in one function call?

Ralph Ritoch <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <CABFWrWVppgW8AGn2arQXBhCpcaLJMMFeq2koYxBNUfygnvMicA@mail.gmail.com>
Chris,

What you need is an fmap function but I don't see any. The best I can
suggest would be something like this...

map(color_defs,Function.splice_call,GTK2.GdkColor);

Best Regards,
  Ralph Ritoch




On Fri, Apr 25, 2014 at 8:50 AM, Chris Angelico <[email protected]> wrote:

> On Fri, Apr 25, 2014 at 10:44 AM, Ralph Ritoch <[email protected]> wrote:
> > Have you tried using parenthesis to control the order of operations?
> >
> >  colors = GTK2.GdkColor(@(color_defs[*]));
> >
> > This seems to work for me.
>
> Yes, tried that. It does the exact same thing as not having the
> parens. It does appear to "work" in the sense that it will be valid
> code. It just isn't doing what I expect of it; and the most obvious
> evidence of that is that the data type of the result is "object"
> rather than "array(object)". (And if I do this in a context where a
> 'mixed' result is accepted, I then get "[*] not supported here".)
>
> I'm doing this on Pike 8.0.1, built from a fairly recent trunk (plus a
> few patches that haven't yet been accepted).
>
> ChrisA
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.