Permalink
Browse files

Merge pull request #8 from yamt/pqueue2-fix

fix pqueue2:is_empty/1
  • Loading branch information...
2 parents 3971b4a + 844dc8a commit 9c467db8f91f3657df49acdf537736b9ff3d1132 @okeuday committed Aug 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/pqueue2.erl
View
@@ -107,8 +107,8 @@ in(Value, P, H) ->
is_empty(empty) ->
true;
-is_empty({_, empty, empty, queue, Queue}) ->
- queue:is_empty(Queue);
+is_empty({_, HL, HR, queue, Queue}) ->
+ is_empty(HL) andalso is_empty(HR) andalso queue:is_empty(Queue);
is_empty(_) ->
false.

0 comments on commit 9c467db

Please sign in to comment.