Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions F#/PointFree.Test/PointFree.Test.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
<GenerateProgramFile>true</GenerateProgramFile>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<Compile Include="PointFreeTest.fs" />

</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="FsUnit" Version="6.0.0" />
<PackageReference Include="FsCheck" Version="2.16.6" />
<PackageReference Include="NUnit" Version="4.1.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PointFree\PointFree.fsproj" />
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions F#/PointFree.Test/PointFreeTest.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module PointFree.Test

open NUnit.Framework
open FsCheck

let functionsEqual x l =
func x l = func5 x l

[<Test>]
let equaltyTest () =
Check.QuickThrowOnFailure functionsEqual
7 changes: 7 additions & 0 deletions F#/PointFree/PointFree.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module PointFree

let func x l = List.map (fun y -> y * x) l
// let func2 x = List.map (fun y -> y * x)
// let func3 x = List.map (fun y -> x * y)
// let func4 x = List.map ((*) x)
let func5 = List.map << (*)
12 changes: 12 additions & 0 deletions F#/PointFree/PointFree.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="PointFree.fs" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions F#/forSpbu.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "07.03", "07.03", "{5CA9053B
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Homework1", "Homework1\Homework1.fsproj", "{04B15EE4-079A-42ED-ACC8-E2DCD25281C6}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PointFree", "PointFree\PointFree.fsproj", "{410AC086-0A51-4171-B346-060126F1437D}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "PointFree.Test", "PointFree.Test\PointFree.Test.fsproj", "{304F1B3F-191F-45BF-A62D-5ABD5DFE5E9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -58,6 +62,14 @@ Global
{89A935E8-B5F3-435D-ACC3-A99DD7C66178}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89A935E8-B5F3-435D-ACC3-A99DD7C66178}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89A935E8-B5F3-435D-ACC3-A99DD7C66178}.Release|Any CPU.Build.0 = Release|Any CPU
{410AC086-0A51-4171-B346-060126F1437D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{410AC086-0A51-4171-B346-060126F1437D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{410AC086-0A51-4171-B346-060126F1437D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{410AC086-0A51-4171-B346-060126F1437D}.Release|Any CPU.Build.0 = Release|Any CPU
{304F1B3F-191F-45BF-A62D-5ABD5DFE5E9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{304F1B3F-191F-45BF-A62D-5ABD5DFE5E9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{304F1B3F-191F-45BF-A62D-5ABD5DFE5E9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{304F1B3F-191F-45BF-A62D-5ABD5DFE5E9A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7937CDA8-8285-4E23-AD1A-FC0F04FEEFE6} = {91E3BDA2-0836-46C2-95F0-02513FD7F13F}
Expand Down