Skip to content

Instantly share code, notes, and snippets.

@jaytaph
Created January 18, 2013 19:02
Show Gist options
  • Save jaytaph/4567305 to your computer and use it in GitHub Desktop.
Save jaytaph/4567305 to your computer and use it in GitHub Desktop.
parse_args
dll *given;
hash *needed;
given_count = given->size;
needed_count = needed->size;
// Three different situations
// 1. given_count is equal to need_count
// - Always OK. Map normally
// 2. given_count < need_count
// - OK when rest has default values
// 3. given_count > need_count
// - OK when typehint of last needed is ... (placed inside a single hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment