![]() ![]() Wolfram language allows one to define a pure function in which arguments are specified as #, #1, #2, etc. Finally, these functions may be dynamically changed and modified during the program's execution. Another application of them is that while they can be assigned to some symbols, they exist independently of their arguments and can be called just by name with the arguments being supplied separately, so that the "assembly" to the working function happens already at the place where the function is used. Pure functions allow their use without assigning them names, storing them in the global rule base etc. From the practical viewpoint, the idea is that often we need some intermediate functions which we have to use just once, and we don't want to give them separate names. The notion of a pure function comes from the calculus, and is widely used in functional programming languages, Mathematica in particular. The syntax is straightforward and simple:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |