[MLton-user] Extended Basis Library: Partial order concept
Geoffrey Alan Washburn
geoffw at cis.upenn.edu
Tue May 8 08:45:14 PDT 2007
Vesa Karvonen wrote:
> On 5/8/07, Geoffrey Alan Washburn <geoffw at cis.upenn.edu> wrote:
> [...]
>> While shorter is usually better, I'm not sure I agree in this
>> case. At
>> least I hypothesize that most times that someone would want to define a
>> partial order, they would find it more natural to define it in terms
>> of a
>> reflexive, transitive, anti-symmetric relation, rather than a
>> transitive,
>> anti-symmetric relation. For example, in one of my several
>> structures that
>> admits a partial order (but not a total order) is an ordering based upon
>> subset inclusion. Therefore, I could define
>>
>> val op <= = Set.isSubset
>>
>> instead of
>>
>> fun x < y = Set.isSubset (x, y) andalso not (Set.==(x, y))
>>
>> furthermore in some cases equality will be defined in terms of <= and
>> therefore writing something like the above may be a little awkward.
>
> Those are good points and I have to agree that <= is probably the better
> alternative for the partial order concept. Indeed, the table in my
> previous
> message doesn't apply to this case. I apparently made it under the
> assumption of a total order.
I was wondering about that, but in the few minutes I tried I
couldn't find a good example that contradicted your table.
--
[Geoff Washburn|geoffw at cis.upenn.edu|http://www.cis.upenn.edu/~geoffw/]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20070508/542eca06/attachment.html
More information about the MLton-user
mailing list