Skip to content

Commit 35cceec

Browse files
authored
Improve MapSet.split_with/2 doctest and fix predicate arity (#15551)
1 parent 9c83ece commit 35cceec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/elixir/lib/map_set.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,11 +396,11 @@ defmodule MapSet do
396396
iex> while_false
397397
MapSet.new([1, 3])
398398
399-
iex> {while_true, while_false} = MapSet.split_with(MapSet.new(), fn {_k, v} -> v > 50 end)
399+
iex> {while_true, while_false} = MapSet.split_with(MapSet.new([10, 20, 60, 70]), fn v -> v > 50 end)
400400
iex> while_true
401-
MapSet.new([])
401+
MapSet.new([60, 70])
402402
iex> while_false
403-
MapSet.new([])
403+
MapSet.new([10, 20])
404404
405405
"""
406406
@doc since: "1.15.0"

0 commit comments

Comments
 (0)