Skip to content

Commit b00e57c

Browse files
committed
adding first problem from ch 1
1 parent 9db45cc commit b00e57c

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

‎Ch1P1/Ch1P1.fs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(* Declare a function g: int -> int, where g(n) = n + 4 *)
2+
module Ch1P1
3+
4+
let g = function
5+
| n -> ( n + 4 )
6+
7+
let h = g 5
8+
9+
printf "%i" h // Output: 9

‎Ch1P1/Ch1P1.fsproj‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="Ch1P1.fs" />
10+
</ItemGroup>
11+
12+
</Project>

‎FunctionalProgrammingWithFSharp.sln‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ VisualStudioVersion = 25.0.1703.2
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Scratch", "FunctionalProgrammingWithFSharp\Scratch.fsproj", "{A45E3B53-8A4F-4622-BAC7-7ED481268ED0}"
77
EndProject
8+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Ch1P1", "Ch1P1\Ch1P1.fsproj", "{DA118775-65E2-42A7-B629-18B685557153}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
1517
{A45E3B53-8A4F-4622-BAC7-7ED481268ED0}.Debug|Any CPU.Build.0 = Debug|Any CPU
1618
{A45E3B53-8A4F-4622-BAC7-7ED481268ED0}.Release|Any CPU.ActiveCfg = Release|Any CPU
1719
{A45E3B53-8A4F-4622-BAC7-7ED481268ED0}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{DA118775-65E2-42A7-B629-18B685557153}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{DA118775-65E2-42A7-B629-18B685557153}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{DA118775-65E2-42A7-B629-18B685557153}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{DA118775-65E2-42A7-B629-18B685557153}.Release|Any CPU.Build.0 = Release|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)