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 use this approach
lst = {{1, 2}, {3, 4}};
f /@ lst
(*{someActions[{1, 2}], someActions[{3, 4}]}*)
But as we know Map over list is slower than using function with attribute Listable.
When I set attribute Listable to my function I get not expected result:
SetAttributes[f, Listable]
f[lst]
(*{{f[1], f[2]}, {f[3], f[4]}}*)
How can I use attribute Listable with function which take a list of lists as input?
Listablehere: (35150) – Mr.Wizard Sep 12 '14 at 09:13