Exemple #1
0
 /// <summary>
 /// Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.`R.cond` takes a list of [predicate, transformer] pairs. All of the argumentsto `fn` are applied to each of the predicates in turn until one returns a"truthy" value, at which point `fn` returns the result of applying itsarguments to the corresponding transformer. If none of the predicatesmatches, `fn` returns undefined.
 /// <para />
 /// sig: [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)
 /// </summary>
 /// <param name="pairs">A list of [predicate, transformer]</param>
 /// <returns>Function</returns>
 public static dynamic Cond(RamdaPlaceholder pairs = null)
 {
     return(Currying.Cond(pairs));
 }
Exemple #2
0
 /// <summary>
 /// Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.`R.cond` takes a list of [predicate, transformer] pairs. All of the argumentsto `fn` are applied to each of the predicates in turn until one returns a"truthy" value, at which point `fn` returns the result of applying itsarguments to the corresponding transformer. If none of the predicatesmatches, `fn` returns undefined.
 /// <para />
 /// sig: [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)
 /// </summary>
 /// <param name="pairs">A list of [predicate, transformer]</param>
 /// <returns>Function</returns>
 public static dynamic Cond(IList <dynamic> pairs)
 {
     return(Currying.Cond(pairs));
 }
Exemple #3
0
 /// <summary>
 /// Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.`R.cond` takes a list of [predicate, transformer] pairs. All of the argumentsto `fn` are applied to each of the predicates in turn until one returns a"truthy" value, at which point `fn` returns the result of applying itsarguments to the corresponding transformer. If none of the predicatesmatches, `fn` returns undefined.
 /// <para />
 /// sig: [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)
 /// </summary>
 /// <param name="pairs">A list of [predicate, transformer]</param>
 /// <returns>Function</returns>
 public static dynamic Cond(Delegate[][] pairs)
 {
     return(Currying.Cond(pairs));
 }