Filip Konvička wrote:
ok. as said before, i was not concerned with the implementation, but
rather with the interface.
I was not talking about implementation, either. I just don't see what
behavior do you propose for the cases when the record arity is not fully
determined yet. If you propose that the minimum feature is selected,
then you'd have to wait until the arity is determined.
that was intended. if a pattern capturing features and containing
ellipsis were used, the case statement should freeze until all features
are determined.
Which brings me to a more constructive comment:
which is fine, thanks, though does not scale up to patterns such as
a(F1:v F2:v ...), since v cannot be the feature of two fields, as it
would have to be in the inversed record.
vQ
local
fun {InsideOut R}
NR={Dictionary.new}
in
{Record.forAllInd R
proc {$ F V} N in
{Dictionary.condExchange NR V F N N}
end
}
{Dictionary.toRecord {Label R} NR}
end
in
case {InsideOut a(b:c d:e)}
of a(c:F ...) then
{Show F}
end
end
Cheers,
Filip
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users