For example, if I define a function like this:
SetAttributes[func,Listable];
func@{{1,2},{3,4}}
it gives the result like:
{{func[1], func[2]}, {func[3], func[4]}}
However, if I make a more specific define, like:
func = #*{1,1}&
then running the same code will create: {{1,2},{3,4}} instead of {{{1,1},{2,2}},{{3,3},{4,4}}}, like what it would normally do when you run {{func[1], func[2]}, {func[3], func[4]}}.
How come? What should I do if I want it to function as I wanted it to?
func[x_] := x {1, 1};in definingfunc? – kglr Jan 22 '18 at 09:05func = Function[x, x {1, 1}, Listable]does also work... – Henrik Schumacher Jan 22 '18 at 18:19