W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2015

[Bug 29353] Lossless map:merge

From: <bugzilla@jessica.w3.org>
Date: Thu, 31 Dec 2015 08:22:49 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29353-523-Gyv5IPGpBR@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29353

Michael Kay <mike@saxonica.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mike@saxonica.com

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
Your desired function can be written

function f:merge-entries($m1, $m2) {
  map:merge(
    for $k in distinct-values((map:keys($m1), map:keys($m2))
    return map{$k : ($m1($k), $m2($k))}
  )
}

which doesn't feel inelegant to me, and if it's inefficient, that's an
implementation problem.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 31 December 2015 08:22:52 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 31 December 2015 08:22:53 UTC