xsl-list
[Top] [All Lists]

Re: Looking for a shorter mapping expression

2004-12-05 04:47:20
"Dimtre" == Dimtre Novatchev <dnovatchev(_at_)gmail(_dot_)com> writes:

    >> How about:
    >> 
    >> f:a ($pFun, $pList)
    >> 
    >> :-) :-) :-)
    >> 
    >> I don't understand the compactness requirement.


    Dimtre> It can be very essential -- if the "/" operator allowed an
    Dimtre> arbitrary sequence on the left, then it would be
    Dimtre> preferrable to f:map()

    Dimtre> But I'm not satisfied at all with the currently (un)
    Dimtre> available ways to define the type of such higher order
    Dimtre> operators in XPath2.

Don't you mean XSLT 2.0

    Dimtre> Compare to the strict type definition in Haskell:

    Dimtre>         map :: (a -> b) -> [a] -> [b]


I see what you mean - for f:map you currently have:

    
    <xsl:function name="f:map" as="item()*">
      <xsl:param name="pFun" as="element()"/>
      <xsl:param name="pList1" as="item()*"/>

whereas what you want is:

    
    <xsl:function name="f:map" like="pList1">
      <xsl:param name="pFun" as="element()"/>
      <xsl:param name="pList1" as="item()*"/>

which is not valid XSLT 2.0.
And I guess it's probably too late to have such a proposal considered.
-- 
Colin Paul Adams
Preston Lancashire

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--