foreign func sin(x: f64) -> f64 foreign func cos(x: f64) -> f64 func test(x: f64) -> f64: let s = sin(x) let c = cos(x) return s * s + c * c