Skip to content

Commit 9c83ece

Browse files
authored
Align Access.filter/1 spec with its truthy semantics (#15550)
1 parent 9e687da commit 9c83ece

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/elixir/lib/access.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ defmodule Access do
934934
935935
"""
936936
@doc since: "1.6.0"
937-
@spec filter((term -> boolean)) :: access_fun(data :: list, current_value :: list)
937+
@spec filter((term -> as_boolean(term))) :: access_fun(data :: list, current_value :: list)
938938
def filter(func) when is_function(func) do
939939
fn op, data, next -> filter(op, data, func, next) end
940940
end

0 commit comments

Comments
 (0)