Exemplo n.º 1
0
 /**
  * This method returns each item in this collection until the predicate doesn't fail.
  *
  * @access public
  * @static
  * @param ILinkedList\Type $xs                              the left operand
  * @param callable $predicate                               the predicate function to be used
  * @return ILinkedList\Type                                 the list
  */
 public static function takeWhileEnd(ILinkedList\Type $xs, callable $predicate) : ILinkedList\Type
 {
     return ILinkedList\Module::takeWhile($xs, function (Core\Type $x, IInt32\Type $i) use($predicate) : IBool\Type {
         return IBool\Module::not($predicate($x, $i));
     });
 }