We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6064b8b commit 46d914cCopy full SHA for 46d914c
lib/igniter/code/common.ex
@@ -1195,8 +1195,10 @@ defmodule Igniter.Code.Common do
1195
Runs the function `fun` on the subtree of the currently focused `node` and
1196
returns the updated `zipper`.
1197
1198
- `fun` must return {:ok, zipper} or `:error`, which may be positioned at the top of the subtree.
+ `fun` must return `{:ok, zipper}` or `:error`, which may be positioned at the top of the subtree.
1199
"""
1200
+ @spec within(Zipper.t(), (Zipper.t() -> {:ok, Zipper.t()} | :error)) ::
1201
+ {:ok, Zipper.t()} | :error
1202
def within(%Zipper{} = top_zipper, fun) when is_function(fun, 1) do
1203
top_zipper
1204
|> Zipper.subtree()
0 commit comments