konstanz.de
> [mailto:basex-talk-boun...@mailman.uni-konstanz.de] Namens Dirk Kirsten
> Verzonden: donderdag 14 augustus 2014 8:49
> Aan: basex-talk@mailman.uni-konstanz.de
> Onderwerp: Re: [basex-talk] Apply variable argument list to anonymous function
>
> Hi Rob, Hi Marc,
>
&
;
>
>> -Oorspronkelijk bericht-
>> Van: Marc van Grootel [mailto:marc.van.groo...@gmail.com]
>> Verzonden: donderdag 14 augustus 2014 13:42
>> Aan: Rob Stapper
>> CC: BaseX
>> Onderwerp: Re: [basex-talk] Apply variable argument list to anonymous
>&g
Hi all,
I've submitted a proposal to the issue tracker for XQuery 3.1. After
thinking about it for a while I realized that to me it appears quite
feasible to use the 3.1 array type to have something like fn:apply and
also keep the current semantics with for example the proposed arrow
operator. I h
On Thu, 14 Aug 2014 13:42:24 +0200
Marc van Grootel wrote:
> I will try to come up with a simple but representative example this evening.
Note, if you are proposing a change to the XQuery languuage itself, the XQuery
WG and the XSLT WG are aware of limitations in our syntax and the fact you
ca
ian
> -Oorspronkelijk bericht-
> Van: Marc van Grootel [mailto:marc.van.groo...@gmail.com]
> Verzonden: donderdag 14 augustus 2014 13:42
> Aan: Rob Stapper
> CC: BaseX
> Onderwerp: Re: [basex-talk] Apply variable argument list to anonymous function
>
> Maybe too much context? Sorry f
in xquery.
Success,
Rob
-Oorspronkelijk bericht-
Van: Marc van Grootel [mailto:marc.van.groo...@gmail.com]
Verzonden: donderdag 14 augustus 2014 13:42
Aan: Rob Stapper
CC: BaseX
Onderwerp: Re: [basex-talk] Apply variable argument list to anonymous function
Maybe too much context? Sorry f
>> string-join).
>>
>> This is not me saying you should not use fold (in fact it is a very
>> nice and elegant function), but that you might want to consider the
>> performance impact.
>>
>> Cheers,
>> Dirk
>>
>> On 14/08/14 08:15, Rob Stapper wr
>>
>> )
>>
>> { fold-left( $args
>>
>>, ''
>>
>>, $fn
>>
>>)
>>
>> } ;
>>
>>
>>
>> local:apply( concat#2, $args
, $fn
>
>)
>
> } ;
>
>
>
> local:apply( concat#2, $args)
>
>
>
> Van: basex-talk-boun...@mailman.uni-konstanz.de
> [mailto:basex-talk-boun...@mailman.uni-konstanz.de] Namens Marc van
> Grootel
> Verzonden
t;>
>> declare variable $args := ('a', 'b', 'c');
>>
>> declare function local:apply
>>
>> ( $fn
>>
>> , $args
>>
>> )
>>
>> { fold-left( $args
>>
>>
> } ;
>
>
>
> local:apply( concat#2, $args)
>
>
>
> Van: basex-talk-boun...@mailman.uni-konstanz.de
> [mailto:basex-talk-boun...@mailman.uni-konstanz.de] Namens Marc van Grootel
> Verzonden: woensdag 13 augustus 2014 22:16
> Aan:
al:apply( concat#2, $args)
Van: basex-talk-boun...@mailman.uni-konstanz.de
[mailto:basex-talk-boun...@mailman.uni-konstanz.de] Namens Marc van Grootel
Verzonden: woensdag 13 augustus 2014 22:16
Aan: BaseX
Onderwerp: [basex-talk] Apply variable argument list to anonymous function
Hi,
I am t
argument list to anonymous function
Hi,
I am trying to call an anonymous function with a variable argument list.
Maybe I'm overlooking something within XQuery but I cannot figure out how to do
this.
This is the code I would like to get working.
declare function local:apply($fn,
Grootel
Verzonden: woensdag 13 augustus 2014 22:16
Aan: BaseX
Onderwerp: [basex-talk] Apply variable argument list to anonymous function
Hi,
I am trying to call an anonymous function with a variable argument list.
Maybe I'm overlooking something within XQuery but I cannot figure out h
Hi Marc,
interesting question! Although I don't actually now the answer, I think
there is an easy work-around for this one. Simply use string-join()
instead of concat, i.e.
declare variable $concat := fn:string-join#1;
It will yield the same result.
I don't actually know how to properly handl
Hi,
I am trying to call an anonymous function with a variable argument list.
Maybe I'm overlooking something within XQuery but I cannot figure out how
to do this.
This is the code I would like to get working.
declare function local:apply($fn, $args) {
$fn($args)
};
declare variable $
16 matches
Mail list logo