新增内容

This commit is contained in:
Sanchime 2022-02-16 21:24:38 +08:00
parent 0678bbad9a
commit 05bde0f1e7
36 changed files with 202 additions and 5 deletions

View File

@ -7,7 +7,9 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
<Compile Include="HelloWorld.fs" />
<Compile Include="LetBinding.fs" />
<Compile Include="SimpleFunction.fs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,14 @@
module HelloWorld
// F#,使
// main
let main () =
// F#向控制台输出Hello world from F#
printfn "Hello world from F#"
//
main ()
// ,F#main,,
//

View File

@ -0,0 +1,23 @@
module LetBinding
// F#使let
//
let a = 1
// 1a
printfn "%d" a
//
// :
//
// a = 2
// ,
// F#,
// 上面let a = 1
//
// 使,
// F#
// 比如1默认是int类型, 1.0float,'a'char,"abc"string
// bfloat
let b = 3.1415926

View File

@ -1,4 +0,0 @@

// For more information see https://aka.ms/fsharp-console-apps
printfn "Hello from F#"

View File

@ -0,0 +1,21 @@
module SimpleFunction
// F#
// ,
// let,
// ,F#,,
let a = 1
// 下面函数将一个a输入,并且返回a + 1
let add_one a = a + 1
//
printfn "%d" (add_one a)
// 该函数将输出2(即a + 1)
//
let add a b = a + b
let mul a b = a * b

View File

@ -0,0 +1,82 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Basic-practice-of-FSharp/1.0.0": {
"dependencies": {
"FSharp.Core": "6.0.1"
},
"runtime": {
"Basic-practice-of-FSharp.dll": {}
}
},
"FSharp.Core/6.0.1": {
"runtime": {
"lib/netstandard2.1/FSharp.Core.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.121.52202"
}
},
"resources": {
"lib/netstandard2.1/cs/FSharp.Core.resources.dll": {
"locale": "cs"
},
"lib/netstandard2.1/de/FSharp.Core.resources.dll": {
"locale": "de"
},
"lib/netstandard2.1/es/FSharp.Core.resources.dll": {
"locale": "es"
},
"lib/netstandard2.1/fr/FSharp.Core.resources.dll": {
"locale": "fr"
},
"lib/netstandard2.1/it/FSharp.Core.resources.dll": {
"locale": "it"
},
"lib/netstandard2.1/ja/FSharp.Core.resources.dll": {
"locale": "ja"
},
"lib/netstandard2.1/ko/FSharp.Core.resources.dll": {
"locale": "ko"
},
"lib/netstandard2.1/pl/FSharp.Core.resources.dll": {
"locale": "pl"
},
"lib/netstandard2.1/pt-BR/FSharp.Core.resources.dll": {
"locale": "pt-BR"
},
"lib/netstandard2.1/ru/FSharp.Core.resources.dll": {
"locale": "ru"
},
"lib/netstandard2.1/tr/FSharp.Core.resources.dll": {
"locale": "tr"
},
"lib/netstandard2.1/zh-Hans/FSharp.Core.resources.dll": {
"locale": "zh-Hans"
},
"lib/netstandard2.1/zh-Hant/FSharp.Core.resources.dll": {
"locale": "zh-Hant"
}
}
}
}
},
"libraries": {
"Basic-practice-of-FSharp/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"FSharp.Core/6.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VrFAiW8dEEekk+0aqlbvMNZzDvYXmgWZwAt68AUBqaWK8RnoEVUNglj66bZzhs4/U63q0EfXlhcEKnH1sTYLjw==",
"path": "fsharp.core/6.0.1",
"hashPath": "fsharp.core.6.0.1.nupkg.sha512"
}
}
}

View File

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}

Binary file not shown.

View File

@ -0,0 +1,3 @@
namespace Microsoft.BuildSettings
[<System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName="")>]
do ()

View File

@ -0,0 +1,17 @@
// <auto-generated>
// Generated by the FSharp WriteCodeFragment class.
// </auto-generated>
namespace FSharp
open System
open System.Reflection
[<assembly: System.Reflection.AssemblyCompanyAttribute("Basic-practice-of-FSharp")>]
[<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
[<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")>]
[<assembly: System.Reflection.AssemblyProductAttribute("Basic-practice-of-FSharp")>]
[<assembly: System.Reflection.AssemblyTitleAttribute("Basic-practice-of-FSharp")>]
[<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
do()

View File

@ -0,0 +1 @@
6222a14c3308d0fc0d25ec1d195e485c25706689

View File

@ -0,0 +1,26 @@
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.AssemblyInfoInputs.cache
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.AssemblyInfo.fs
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.fsproj.AssemblyReference.cache
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/Basic-practice-of-FSharp
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/Basic-practice-of-FSharp.deps.json
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/Basic-practice-of-FSharp.runtimeconfig.json
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/Basic-practice-of-FSharp.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/Basic-practice-of-FSharp.pdb
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/FSharp.Core.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/cs/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/de/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/es/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/fr/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/it/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/ja/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/ko/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/pl/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/pt-BR/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/ru/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/tr/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/zh-Hans/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/bin/Debug/net6.0/zh-Hant/FSharp.Core.resources.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.fsproj.CopyComplete
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.dll
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.pdb
/home/sanchime/桌面/Program/F#/Basic-practice-of-FSharp/Basic-practice-of-FSharp/obj/Debug/net6.0/Basic-practice-of-FSharp.genruntimeconfig.cache

View File

@ -0,0 +1 @@
7cf80e63319ef6c9b32b4cc667a5dad8fccb8d4d

Binary file not shown.

View File

@ -0,0 +1,2 @@
2022/2/16 下午1:17:11
{}