<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I am a bit nonplussed with the behaviour of map module…consider the following map:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">f(MAP), MAP = #{ {12,1} => "some value", {12,2} => "some other value"}. </span></div></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">Then, the following works:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">f(V), case MAP of #{ {1,12} := V} -> V end.</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">                            </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">"some value”</span></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">Then, surely, a snippet below should also work... except that it doesn’t: </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> f(DCID), f(SORD), DCID = 12, SORD=1. </span></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">f(V), case MAP of #{ {DCID, SORD} := V} -> V end.</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">* 1: illegal map key in pattern</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></div></div><div class=""><br class=""></div><div class="">To make things worse, when I just replace an explicit term, such as {DCID, SORD}, with something like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">f(GRP_KEY), GRP_KEY={DCID, SORD}. </span></div></div></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">f(V), case MAP of #{ GRP_KEY := V} -> V end.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">"some value”</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(43, 102, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Then the whole thing works again.</div><div class=""><br class=""></div><div class="">I would argue that all cases should just work.</div><div class="">How come they don’t? </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Kind regards</div><div class=""><br class=""></div><div class="">V/</div><div class=""><br class=""></div></body></html>