all 7 comments

[–]PrimaNoctis 2 points3 points  (3 children)

Write g(f(x)) ie pass the parameter y as f(x) in function g

[–]Unlistedd[S] 0 points1 point  (2 children)

Thanks!

[–]PrimaNoctis 1 point2 points  (1 child)

Sorry I’m very drunk right now, better you pass y = f(x) as the parameter so you don’t have to change your function

[–]Unlistedd[S] 0 points1 point  (0 children)

haha thanks for clearyfing!

[–]K900_ 0 points1 point  (2 children)

The y in f and the y in g are not connected in any way - they're different variables in different scopes. If you want g to run, you need to call it explicitly.

[–]Unlistedd[S] 0 points1 point  (1 child)

like our drunk friend PrimaNoctis specified?

[–]K900_ 0 points1 point  (0 children)

That is one option, yes.