Skip to content

Commit f6bdb4f

Browse files
committed
Remove FSharpx.DataStructures.RoseTree which has been obsolete for quite some time now
1 parent d9cf4ba commit f6bdb4f

7 files changed

Lines changed: 40 additions & 129 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace FSharpx.Collections.Experimental
2+
3+
open System
4+
open System.Runtime.CompilerServices
5+
open FSharpx
6+
open FSharpx.Collections
7+
8+
[<Extension>]
9+
type RoseTree =
10+
static member Singleton x = RoseTree.singleton x
11+
static member Create(root, [<ParamArray>] children) = RoseTree.create root (LazyList.ofArray children)
12+
static member Create(root, children) = RoseTree.create root children
13+
14+
[<Extension>]
15+
static member Select(tree, f: Func<_,_>) = RoseTree.map f.Invoke tree
16+
17+
[<Extension>]
18+
static member SelectMany (o, f: Func<_,_>) = RoseTree.bind f.Invoke o
19+
20+
[<Extension>]
21+
static member SelectMany (o, f: Func<_,_>, mapper: Func<_,_,_>) =
22+
let mapper = RoseTree.lift2 (curry mapper.Invoke)
23+
let v = RoseTree.bind f.Invoke o
24+
mapper o v
25+
26+
[<Extension>]
27+
static member SelectAccum (o, state, f: Func<_,_,_>) =
28+
let ff = FSharpFunc.FromFunc f
29+
RoseTree.mapAccum ff state o

src/FSharpx.Collections.Experimental/FSharpx.Collections.Experimental.fsproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<Compile Include="BatchedDeque.fs" />
5353
<Compile Include="BatchedQueue.fs" />
5454
<Compile Include="BinaryRandomAccessList.fs" />
55-
<Compile Include="BinaryRoseTree.fs" />
55+
<Compile Include="BinaryRoseTree.fs" />
5656
<Compile Include="BinaryTreeZipper.fs" />
5757
<Compile Include="BinomialHeap.fs" />
5858
<Compile Include="IntMap.fs" />
@@ -62,13 +62,13 @@
6262
<Compile Include="Deque.fs" />
6363
<Compile Include="DList.fs" />
6464
<Compile Include="EagerRoseTree.fs" />
65-
<Compile Include="FlatList.fsi" />
66-
<Compile Include="FlatList.fs" />
65+
<Compile Include="FlatList.fsi" />
66+
<Compile Include="FlatList.fs" />
6767
<Compile Include="PairingHeap.fs" />
6868
<Compile Include="HeapPriorityQueue.fs" />
6969
<Compile Include="HoodMelvilleQueue.fs" />
7070
<Compile Include="ImplicitQueue.fs" />
71-
<Compile Include="IndexedRoseTree.fs" />
71+
<Compile Include="IndexedRoseTree.fs" />
7272
<Compile Include="LeftistHeap.fs" />
7373
<Compile Include="ListZipper.fs" />
7474
<Compile Include="PhysicistQueue.fs" />
@@ -79,6 +79,7 @@
7979
<Compile Include="SkewBinaryRandomAccessList.fs" />
8080
<Compile Include="TimeSeries.fs" />
8181
<Compile Include="Vector.fs" />
82+
<Compile Include="CSharpCompat.fs" />
8283
</ItemGroup>
8384
<ItemGroup>
8485
<Reference Include="FSharp.Core" Condition="$(TargetFrameworkVersion) == 'v3.5'">

src/FSharpx.Core/CSharpCompat.fs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -532,25 +532,3 @@ type FSharpLazy =
532532
static member Create (v: _ Func) = Lazy.Create v.Invoke
533533
static member CreateFromValue v = Lazy.CreateFromValue v
534534

535-
[<Extension>]
536-
type RoseTree =
537-
static member Singleton x = RoseTree.singleton x
538-
static member Create(root, [<ParamArray>] children) = RoseTree.create root (LazyList.ofArray children)
539-
static member Create(root, children) = RoseTree.create root children
540-
541-
[<Extension>]
542-
static member Select(tree, f: Func<_,_>) = RoseTree.map f.Invoke tree
543-
544-
[<Extension>]
545-
static member SelectMany (o, f: Func<_,_>) = RoseTree.bind f.Invoke o
546-
547-
[<Extension>]
548-
static member SelectMany (o, f: Func<_,_>, mapper: Func<_,_,_>) =
549-
let mapper = RoseTree.lift2 (curry mapper.Invoke)
550-
let v = RoseTree.bind f.Invoke o
551-
mapper o v
552-
553-
[<Extension>]
554-
static member SelectAccum (o, state, f: Func<_,_,_>) =
555-
let ff = FSharpFunc.FromFunc f
556-
RoseTree.mapAccum ff state o

src/FSharpx.Core/DataStructures/RoseTree.fs

Lines changed: 0 additions & 99 deletions
This file was deleted.

src/FSharpx.Core/FSharpx.Core.fsproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
<Compile Include="DataStructures\HeapPriorityQueue.fs" />
103103
<Compile Include="DataStructures\BinaryTreeZipper.fs" />
104104
<Compile Include="DataStructures\ListZipper.fs" />
105-
<Compile Include="DataStructures\RoseTree.fs" />
106105
<Compile Include="DataStructures\BankersQueue.fs" />
107106
<Compile Include="DataStructures\BatchedQueue.fs" />
108107
<Compile Include="DataStructures\PhysicistQueue.fs" />

tests/FSharpx.CSharpTests/FSharpx.CSharpTests.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
<Compile Include="ChoiceTests.cs" />
9393
</ItemGroup>
9494
<ItemGroup>
95+
<ProjectReference Include="..\..\src\FSharpx.Collections.Experimental\FSharpx.Collections.Experimental.fsproj">
96+
<Project>{ad3c8e86-f4cf-426f-a31d-015056227777}</Project>
97+
<Name>FSharpx.Collections.Experimental</Name>
98+
</ProjectReference>
9599
<ProjectReference Include="..\..\src\FSharpx.Core\FSharpx.Core.fsproj">
96100
<Project>{1e95a279-c2a9-498b-bc72-6e7a0d6854ce}</Project>
97101
<Name>FSharpx.Core</Name>
@@ -109,4 +113,4 @@
109113
<Target Name="AfterBuild">
110114
</Target>
111115
-->
112-
</Project>
116+
</Project>

tests/FSharpx.CSharpTests/RoseTreeTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
using System;
22
using System.Linq;
33
using FSharpx.Collections;
4-
using FSharpx.DataStructures;
5-
using Microsoft.FSharp.Collections;
4+
using FSharpx.Collections.Experimental;
65
using NUnit.Framework;
76

87
namespace FSharpx.CSharpTests {

0 commit comments

Comments
 (0)