Skip to content

Commit

Permalink
fix: typespec for find_all/3 (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel authored Oct 18, 2024
1 parent c8a4b1a commit 04d5212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sourceror/zipper.ex
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ defmodule Sourceror.Zipper do
The optional second parameters specifies the `direction`, defaults to
`:next`.
"""
@spec find_all(t, direction :: :prev | :next, predicate :: (tree -> any)) :: t | []
@spec find_all(t, direction :: :prev | :next, predicate :: (tree -> any)) :: [t]
def find_all(%Z{} = zipper, direction \\ :next, predicate)
when direction in [:next, :prev] and is_function(predicate, 1) do
do_find_all(zipper, move(direction), predicate, [])
Expand Down

0 comments on commit 04d5212

Please sign in to comment.