Skip to content

Instantly share code, notes, and snippets.

@puzza007
Forked from anonymous/gist:649554
Created October 27, 2010 17:56
Show Gist options
  • Save puzza007/649579 to your computer and use it in GitHub Desktop.
Save puzza007/649579 to your computer and use it in GitHub Desktop.
%% If this occurs in something that's called often (and might qualify as an inner loop,
%% or might not) does either method have a speed advantage?
[A,B,C] = [get_foo(S) || S<-["a","b","c"],
% versus
A = get_foo("a"),
B = get_foo("b"),
C = get_foo("c"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment