Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created April 27, 2011 00:54
Show Gist options
  • Save mikeobrien/943520 to your computer and use it in GitHub Desktop.
Save mikeobrien/943520 to your computer and use it in GitHub Desktop.
// This one liner:
return GetState().Map(x => x.ContainsKey(key) ? x[key] : null);
// Instead of this multiliner
var state = GetState();
return state.ContainsKey(key) ? state[key] : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment