diff options
author | Björn Gustavsson <[email protected]> | 2018-05-07 13:14:13 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-05-07 13:21:41 +0200 |
commit | 5e2f90735cfd78f353e549bf92bc8792ab1c6d34 (patch) | |
tree | c8f01f8e69ca59c0b79b64fd77390bea2ca83b30 /system/doc/efficiency_guide/efficiency_guide.erl | |
parent | 4c350d64b85686b731d0888c36159b4d126e5cf1 (diff) | |
download | otp-5e2f90735cfd78f353e549bf92bc8792ab1c6d34.tar.gz otp-5e2f90735cfd78f353e549bf92bc8792ab1c6d34.tar.bz2 otp-5e2f90735cfd78f353e549bf92bc8792ab1c6d34.zip |
Remove obsolete example in Efficiency Guide
The argument order is no longer important.
Diffstat (limited to 'system/doc/efficiency_guide/efficiency_guide.erl')
-rw-r--r-- | system/doc/efficiency_guide/efficiency_guide.erl | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/system/doc/efficiency_guide/efficiency_guide.erl b/system/doc/efficiency_guide/efficiency_guide.erl index e982bdae65..c57785aaa3 100644 --- a/system/doc/efficiency_guide/efficiency_guide.erl +++ b/system/doc/efficiency_guide/efficiency_guide.erl @@ -1,5 +1,5 @@ -module(efficiency_guide). --compile(export_all). +-compile([export_all,nowarn_export_all). %% DO NOT naive_reverse([H|T]) -> @@ -71,28 +71,6 @@ all_but_zeroes_to_list(<<0,T/binary>>, Acc, Remaining) -> all_but_zeroes_to_list(<<Byte,T/binary>>, Acc, Remaining) -> all_but_zeroes_to_list(T, [Byte|Acc], Remaining-1). -non_opt_eq([H|T1], <<H,T2/binary>>) -> - non_opt_eq(T1, T2); -non_opt_eq([_|_], <<_,_/binary>>) -> - false; -non_opt_eq([], <<>>) -> - true. - -opt_eq(<<H,T1/binary>>, [H|T2]) -> - opt_eq(T1, T2); -opt_eq(<<_,_/binary>>, [_|_]) -> - false; -opt_eq(<<>>, []) -> - true. - -match_head(List, <<_:10,Data/binary>>) -> - match_body(List, Data). - -match_body([0|_], <<H,_/binary>>) -> - done; -match_body([H|T1], <<H,T2/binary>>) -> - {T1,T2}. - count1(<<_,T/binary>>, Count) -> count1(T, Count+1); count1(<<>>, Count) -> Count. |