add semantics test for function invocations (including lambda)