/* Test predicate functions */ /* Test basic predicate functions */ is_fizzbuzz : n -> (n % 3 = 0) and (n % 5 = 0); is_fizz : n -> n % 3 = 0; is_buzz : n -> n % 5 = 0; /* Test the functions */ test1 : is_fizzbuzz 15; test2 : is_fizz 3; test3 : is_buzz 5; test4 : is_fizzbuzz 7; ..out test1; ..out test2; ..out test3; ..out test4; /* Test simple when with boolean */ simple_test : n -> when true is true then "true" _ then "false"; result1 : simple_test 15; ..out result1; /* Test function call in when */ func_test : n -> when is_fizzbuzz n is true then "FizzBuzz" _ then n; result2 : func_test 15; ..out result2;