/* Test the @ operator for function references */ f : x -> x * 2; g : x -> x + 1; /* Test 1: Function reference in when expression */ abs : x -> when x is x < 0 then -x _ then x; /* Test 2: Using @ operator to reference a function */ result1 : @f 5; /* Should be apply(f, 5) = 10 */ /* Test 3: Function reference in when expression */ test : x -> when x is @f then "f was called" @g then "g was called" _ then "neither"; /* Test 4: Function reference as argument */ result2 : @f; /* Should return the function f itself */