Skip to content

Commit

Permalink
VIP - Add first function to queue_assistant module
Browse files Browse the repository at this point in the history
  • Loading branch information
shahryarjb committed Jun 16, 2024
1 parent 5ffca07 commit 54b24f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/modules/queue_assistant.ex
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,14 @@ defmodule QueueAssistant do
:queue.head(queue)
end

@doc """
Please see `head/1`.
"""
@spec first(queue_type()) :: any()
def first(queue) do
:queue.head(queue)
end

@doc """
Returns a queue `q2` that is the result of removing the tail item from `q1`.
Expand Down

0 comments on commit 54b24f0

Please sign in to comment.