Skip to content

Latest commit

 

History

History
19 lines (19 loc) · 754 Bytes

function.HH.Lib.C.every.md

File metadata and controls

19 lines (19 loc) · 754 Bytes
$strings = vec["a", "b", "c", "d"];
$predicate_result_1 = C\every($strings, $x ==> $x != "z");
echo "First predicate: $predicate_result_1\n";
//Output: First predicate: true
$predicate_result_2 = C\every($strings, $x ==> $x == "a");
echo "Second predicate: $predicate_result_2\n";
//Output: Second predicate: false
$predicate_result_3 = C\every($strings);
echo "Third predicate: $predicate_result_3\n";
//Output: Third predicate: true
$empty_strings = vec[];
$predicate_result_4 = C\every($empty_strings, $x ==> $x == "a");
echo "Fourth predicate: $predicate_result_4\n";
//Output: Fourth predicate: true
$predicate_result_5 = C\every($empty_strings);
echo "Fifth predicate: $predicate_result_5\n";
//Output: Fifth predicate: true