The Mathematica Journal
Volume 10, Issue 2


In This Issue
In and Out
Trott's Corner
Beyond Sudoku
New Products
New Publications
News Bulletins
New Resources

Download This Issue 

About the Journal
Editorial Policy
Staff and Contributors
Back Issues
Contact Information

In and Out
Edited by Paul Abbott

Listable Subvalues

Q: I am writing functions for translating graphics primitives. The following function translates a single line object.

However, if I have a list of lines it does not work.

What is the best solution?

A: You can map your function over the list of lines.

Adding a rule to f for the case of list arguments makes this mapping operation automatic.

David Park ( provides an alternative solution: define as Function. The third argument to Function is a list of attributes for the purpose of evaluation.

Functions for transforming objects in 2 and 3 dimensions are defined in [1] with the packages available at [2].

About Mathematica | Download Mathematica Player 
© Wolfram Media, Inc. All rights reserved.