Tag Info

New answers tagged

5

This question is closely related to: Best practice of passing a large number of parameters to functions In my answer there I gave a couple of abstractions to simplify definitions of the type you describe. I shall reiterate my approach with adjustment for your syntax. Code using listWith SetAttributes[{listWith, defWithOpts2}, HoldAll] listWith[(set : ...


2

The new cluster of Inactive, Inactivate, and Activate heads in 10.0+ were designed for exactly this task. So far as I can tell, they give approximately the same level of functionality as macros in Common Lisp. Consider the following preliminary step that exhibits the desired rewrite in inactive form, just to show the technique at work ...


8

Ad Hoc Programming: Notebooks It is very common for programming problems to be solved completely without leaving the confines of a single notebook. A notebook can contain any combination of function definitions and expressions that use those functions. See, for example, the Function Definitions section of the Fast Introduction For Programmers. The nicest ...



Top 50 recent answers are included