Skip to content

Commit 156e303

Browse files
committed
renamed to batchMap
1 parent 9c82dbc commit 156e303

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/FSharp.Data.Adaptive/AdaptiveHashMap/AdaptiveHashMap.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,9 @@ module AdaptiveHashMapImplementation =
756756

757757
HashMapDelta.ofHashMap changes
758758

759-
/// Reader for batchRecalc operations.
759+
/// Reader for batchMap operations.
760760
[<Sealed>]
761-
type BatchRecalculateDirty<'k, 'a, 'b>(input : amap<'k, 'a>, mapping : HashMap<'k,'a> -> HashMap<'k, aval<'b>>) =
761+
type BatchMap<'k, 'a, 'b>(input : amap<'k, 'a>, mapping : HashMap<'k,'a> -> HashMap<'k, aval<'b>>) =
762762
inherit AbstractReader<HashMapDelta<'k, 'b>>(HashMapDelta.empty)
763763

764764
let reader = input.GetReader()
@@ -1415,17 +1415,17 @@ module AMap =
14151415
else
14161416
create (fun () -> MapAReader(map, mapping))
14171417

1418-
/// Adaptively applies the given mapping to all changes and reapplies mapping on dirty outputs
1419-
let batchRecalcDirty (mapping: HashMap<'K, 'T1> -> HashMap<'K, aval<'T2>>) (map: amap<'K, 'T1>) =
1418+
/// Adaptively applies the given mapping to batches of all changes and reapplies mapping on dirty outputs
1419+
let batchMap (mapping: HashMap<'K, 'T1> -> HashMap<'K, aval<'T2>>) (map: amap<'K, 'T1>) =
14201420
if map.IsConstant then
14211421
let map = force map |> mapping
14221422
if map |> HashMap.forall (fun _ v -> v.IsConstant) then
14231423
constant (fun () -> map |> HashMap.map (fun _ v -> AVal.force v))
14241424
else
14251425
// TODO better impl possible
1426-
create (fun () -> BatchRecalculateDirty(ofHashMap map, id))
1426+
create (fun () -> BatchMap(ofHashMap map, id))
14271427
else
1428-
create (fun () -> BatchRecalculateDirty(map, mapping))
1428+
create (fun () -> BatchMap(map, mapping))
14291429

14301430

14311431
/// Adaptively chooses all elements returned by mapping.

src/FSharp.Data.Adaptive/AdaptiveHashMap/AdaptiveHashMap.fsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ module AMap =
105105
/// Adaptively applies the given mapping function to all elements and returns a new amap containing the results.
106106
val mapA : mapping: ('K -> 'V -> aval<'T>) -> map: amap<'K, 'V> -> amap<'K, 'T>
107107

108-
/// Adaptively applies the given mapping to all changes.
109-
val batchRecalcDirty : mapping: (HashMap<'K,'T1> -> HashMap<'K,aval<'T2>>) -> map: amap<'K, 'T1> -> amap<'K, 'T2>
108+
/// Adaptively applies the given mapping to batches of all changes and reapplies mapping on dirty outputs
109+
val batchMap : mapping: (HashMap<'K,'T1> -> HashMap<'K,aval<'T2>>) -> map: amap<'K, 'T1> -> amap<'K, 'T2>
110110

111111
/// Adaptively chooses all elements returned by mapping.
112112
val chooseA : mapping: ('K -> 'V -> aval<option<'T>>) -> map: amap<'K, 'V> -> amap<'K, 'T>

src/Test/FSharp.Data.Adaptive.Tests/AMap.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,11 +651,11 @@ module AMap =
651651
>> HashMap.map(fun _ v ->
652652
AVal.constant v |> AVal.mapWithAdditionalDependencies (id)
653653
)
654-
AMap.batchRecalcDirty mapping map
654+
AMap.batchMap mapping map
655655

656656

657657
[<Test>]
658-
let ``[AMap] batchRecalcDirty``() =
658+
let ``[AMap] batchMap``() =
659659

660660
let file1 = "File1.fs"
661661
let file1Cval = cval 1

0 commit comments

Comments
 (0)