3
votes
0answers
57 views

Listable on first level

I have some function which take List as input. f[l_List]:=someActions[l] I need apply this function to a list of lists. Now I ...
2
votes
1answer
104 views

Why is either Listable or HoldFirst not working?

Starting with a fresh kernel, I evaluate the following: ...
12
votes
2answers
176 views

How can one write a robust ListableQ function?

I would like to have a test that determines if a particular function is Listable. In the case of Symbols this is merely a matter of checking Attributes. ...
2
votes
1answer
88 views

Map and Scan ignore HoldFirst

I am trying to write a simple function that takes a list of data and outputs it to a file. I'd like the name of the file to be the same as the variable that holds the list. It seems that giving a ...
5
votes
3answers
569 views

Define an 'inner product' with AngleBracket

I want to define my own little 'Inner Product' function satisfying properties of linearity and commutativity, and I'd like to use the "$\langle$" and "$\rangle$" symbols to output my results. For ...
13
votes
2answers
369 views

SetAttributes[f,Flat]: Why the order dependence?

I'm experiencing a strange phenomenon. Here's a (quite artificial) test case: The following definition work just fine: ...