Skip to content

Instantly share code, notes, and snippets.

@SpringMT
Created March 1, 2011 11:33
Show Gist options
  • Save SpringMT/849004 to your computer and use it in GitHub Desktop.
Save SpringMT/849004 to your computer and use it in GitHub Desktop.
minっぽい関数の拡張系CommentsAdd Star
* 入力としてundefあるいは値を複数受け取り
* 結果として値の最小値(あるいは値が全てundefの場合はundef)を返す
my $min_or_undef = List::Util::min(grep { defined $_ } ($a, $b));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment