File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ namespace FSharpPlus
33open System
44open FSharpPlus.Control
55
6+ #nowarn " 0077" // Member constraints with the name 'set_Item' ...
7+
68/// Generic functions and operators
79[<AutoOpenAttribute>]
810module Operators =
@@ -858,6 +860,17 @@ module Operators =
858860 /// <category index =" 16 " >Indexable</category >
859861 let inline tryItem ( n : 'K ) ( source : '``Indexed < 'T > ``) : 'T option = TryItem.Invoke n source
860862
863+ /// <summary >
864+ /// Mutates an item at the given key/index.
865+ /// </summary >
866+ /// <param name =" item " >The key/index where to set the value.</param >
867+ /// <param name =" value " >The value to set.</param >
868+ /// <param name =" source " >The input collection.</param >
869+ /// <returns >unit</returns >
870+ /// <remarks >This function requires that the source type has a mutable indexer.</remarks >
871+ /// <category index =" 16 " >Indexable</category >
872+ let inline setItem ( item : 'K ) ( value : 'T ) ( source : ^``Indexed < 'T > ``) = (^ `` Indexed<'T> `` : ( member set_Item : 'K -> 'T -> unit) ( source, item, value))
873+
861874 /// <summary >
862875 /// Maps with access to the index.
863876 /// </summary >
You can’t perform that action at this time.
0 commit comments