=pod =encoding utf8 =head1 NAME Muldis::D::Ext::Ordered - Muldis D extension for generic ordered-sensitive operators =head1 VERSION This document is Muldis::D::Ext::Ordered version 0.26.0. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; you should read that root document before you read this one, which provides subservient details. =head1 DESCRIPTION Muldis D has a mandatory core set of system-defined (eternally available) entities, which is referred to as the I or the I; they are the minimal entities that all Muldis D implementations need to provide; they are mutually self-describing and are used to bootstrap the language; any entities outside the core, called I, are non-mandatory and are defined in terms of the core or each other, but the reverse isn't true. This current C document describes the system-defined I, which consists of generic operators that are sensitive to an ordering of a type's values, and are used for such things as list sorting or quota queries or determining before/after/min/max/between/etc. They can potentially be used with values of any data type as long as said data type has a (total) C function defined for it, and all system-defined conceptually-ordered Muldis D scalar root types do. This current document does not describe the polymorphic operators that all types, or some types including core types, have defined over them; said operators are defined once for all types in L. I =head1 SYSTEM-DEFINED ORDER-CONCERNING FUNCTIONS Each of these functions which has the 2 parameters named C and C is a wrapper over the C function named in its C argument when the latter function is curried by its C argument. For any scalar root type's type-default order function, the argument for C is C. Each C and C parameter is optional and defaults to C or the zero-attribute tuple, respectively, if no explicit argument is given to it. =over =item C This function is exactly the same as the C function it wraps except that it results in the reverse value when given the same non-C arguments. It is a short-hand for applying C to the result of the wrapped function with the same non-C arguments. =item C This function results in C iff the wrapped function would result in C when given the same arguments, and C otherwise. =item C This function is exactly the same as C except that it results in the opposite boolean value when given the same arguments. (It could alternately be called "is after or is identical".) =item C This function results in C iff its C argument is within the range whose bounds are defined by its C and C arguments. If C or C are C, then C I considered to be within the range if it is equal to C or C, respectively; otherwise, C I considered to be within the range if it is equal to C or C. This function's C and C arguments must be of compatible declared types with C and C as per the wrapped function; otherwise this function will fail|warn when the wrapped function would. This function will fail if C is before C. Each of the C parameters is optional and defaults to C if no explicit argument is given to it. =item C This function is exactly the same as C except that it results in the opposite boolean value when given the same arguments. =item C This function is a reduction operator that recursively takes each pair of its N input element values and picks the minimum of the 2 (a process which is both commutative and associative) until just one is left, which is the function's result. If C has zero values, then this function will fail. Note that, conceptually C I have an identity value which could be this function's result when C has zero values, which is the result type's concept of positive infinity; however, in practice there is little benefit to C supporting this identity value, since the wrapped C function can't supply the value, and also many types' concept of positive infinity is impossible or impractically large to represent, such as with the infinite C type. =item C This function is exactly the same as C except that it results in the maximum input element value rather than the minimum one. (Note that, conceptually C has an identity value which is the result type's concept of negative infinity, but it is unsupported here). =item C This function is exactly the same as C except that it results in a C of what is otherwise the result type, and that result has zero elements if the argument has zero elements, rather than the function failing. =item C This function is to C as C is to C. =back =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =head1 LICENSE AND COPYRIGHT This file is part of the formal specification of the Muldis D language. Muldis D is Copyright © 2002-2008, Darren Duncan. See the LICENSE AND COPYRIGHT of L for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut