Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • $\begingroup$ Mr.Wizard I am struggling with understanding module, because in some examples ive see they assign only lists where you have assigned {fun1,fun2}, an other times its functions as you have done above? what is actually happening. I have read the mathematica guide but when i see all the different examples i get confused. $\endgroup$ Commented Sep 18, 2013 at 17:04
  • $\begingroup$ @ALEXANDER You should read answers to (559). I particularly like WReach's answer as a place to start. In my own brief words Module creates local equivalents for the Symbols given in the first argument (fun1 and fun2) above and silently uses these in place of the global versions. For example you may have fun1$325 used in place of fun1 wherever fun1 appears in the body of the module. They can be used for both direct assignments (fun1 = 5) and pattern definitions (as above). $\endgroup$ Commented Sep 18, 2013 at 18:09
  • 1
    $\begingroup$ If you truly understand a concept you can always explain it in a simple way---> Now it all makes sense! Thank you Mr. Wizard $\endgroup$ Commented Sep 18, 2013 at 19:59