Skip to content

Commit 4d5ed7a

Browse files
s3cur3princemaple
authored andcommitted
Just adds a note that Enum.member?/2 uses the fast :queue implementation (I couldn't figure out why there was no Qex.member?/2)
1 parent db90414 commit 4d5ed7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ iex> Enum.map Qex.new([1, 2, 3]), &(&1 + 1)
4646

4747
iex> inspect Enum.into(1..5, %Qex{})
4848
"#Qex<[1, 2, 3, 4, 5]>"
49+
50+
# Leverages :queue.member/2 under the hood for performance
51+
iex> Enum.member? Qex.new(1..10_000), 9_999
52+
true
4953
```
5054

5155
#### Create a new queue from a range

0 commit comments

Comments
 (0)