Created
March 8, 2009 03:16
-
-
Save moonpolysoft/75554 to your computer and use it in GitHub Desktop.
This file contains 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
%% this is necessary because the binlists returned from the port driver driver_outputv | |
%% come back as a list with a binary as the last element, not a null list. In other words | |
%% [a|b] rather than [a|[b|[]]]. Thus breaking *everything* that expects a well formed list. | |
normalize_tarded_binlist(List) -> | |
normalize_tarded_binlist(List, []). | |
normalize_tarded_binlist(Bin, Acc) when not is_list(Bin) -> | |
lists:reverse([Bin|Acc]); | |
normalize_tarded_binlist([Bin|Rest], Acc) -> | |
normalize_tarded_binlist(Rest, [Bin|Acc]). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment