示例#1
0
 /// <summary>
 /// Makes a comparator function out of a function that reports whether the firstelement is less than the second.
 /// <para />
 /// sig: (a, b -> Boolean) -> (a, b -> Number)
 /// </summary>
 /// <param name="pred">A predicate function of arity two which will return `true` if the first argumentis less than the second, `false` otherwise</param>
 /// <returns>A Function :: a -<![CDATA[>]]> b -<![CDATA[>]]> Int that returns `-1` if a <![CDATA[<]]> b, `1` if b <![CDATA[<]]> a, otherwise `0`</returns>
 public static dynamic Comparator(RamdaPlaceholder pred = null)
 {
     return(Currying.Comparator(pred));
 }
示例#2
0
 /// <summary>
 /// Makes a comparator function out of a function that reports whether the firstelement is less than the second.
 /// <para />
 /// sig: (a, b -> Boolean) -> (a, b -> Number)
 /// </summary>
 /// <param name="pred">A predicate function of arity two which will return `true` if the first argumentis less than the second, `false` otherwise</param>
 /// <returns>A Function :: a -<![CDATA[>]]> b -<![CDATA[>]]> Int that returns `-1` if a <![CDATA[<]]> b, `1` if b <![CDATA[<]]> a, otherwise `0`</returns>
 public static dynamic Comparator(dynamic pred)
 {
     return(Currying.Comparator(Delegate(pred)));
 }
示例#3
0
 /// <summary>
 /// Makes a comparator function out of a function that reports whether the firstelement is less than the second.
 /// <para />
 /// sig: (a, b -> Boolean) -> (a, b -> Number)
 /// </summary>
 /// <param name="pred">A predicate function of arity two which will return `true` if the first argumentis less than the second, `false` otherwise</param>
 /// <returns>A Function :: a -<![CDATA[>]]> b -<![CDATA[>]]> Int that returns `-1` if a <![CDATA[<]]> b, `1` if b <![CDATA[<]]> a, otherwise `0`</returns>
 public static dynamic Comparator <TArg>(Func <TArg, TArg, bool> pred)
 {
     return(Currying.Comparator(Delegate(pred)));
 }