Guest User

Untitled

a guest
Jul 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. VarList={x_, y_};
  2. ParList={x, y};
  3. ValList={2, 3};
  4.  
  5. f[x_, y_] := x^2 + 3 y^3;
  6. g[x_, y_] := 3 f[x, y];
  7.  
  8. f@@ValList
  9. g@@ValList
  10.  
  11. Out[1]=85
  12. Out[2]=255
  13.  
  14. Clear[f, g];
  15.  
  16. f[Sequence@@VarList] := x^2 + 3 y^3;
  17. g[Sequence@@VarList] := 3 f@@ParList;
  18.  
  19. f@@ValList
  20. g@@ValList
  21.  
  22. Out[3]=85
  23. Out[4]=3 (x^2 + 3 y^3)
Add Comment
Please, Sign In to add comment