Created
September 2, 2013 20:39
-
-
Save philipcristiano/6417091 to your computer and use it in GitHub Desktop.
Retrieve the first non `null` value from Graphite datapoints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first_value([[null,Time]|T]) -> | |
first_value(T); | |
first_value([[Value, Time]|T]) -> | |
{ok, Value}; | |
first_value(_)-> | |
{error, no_value}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment