Skip to content

Commit

Permalink
docs(fs): add a F# sample
Browse files Browse the repository at this point in the history
  • Loading branch information
aloisdg committed Jan 6, 2022
1 parent 9e09a60 commit 7a3aba1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Cardidy.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B14BC6AA-208
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "src\App\App.csproj", "{D0574C1A-B65D-4320-9952-5920D8893508}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "AppFs", "src\AppFs\AppFs.fsproj", "{26999B7F-06E1-445D-BB5C-1267ED318B77}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,6 +31,10 @@ Global
{D0574C1A-B65D-4320-9952-5920D8893508}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0574C1A-B65D-4320-9952-5920D8893508}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0574C1A-B65D-4320-9952-5920D8893508}.Release|Any CPU.Build.0 = Release|Any CPU
{26999B7F-06E1-445D-BB5C-1267ED318B77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26999B7F-06E1-445D-BB5C-1267ED318B77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26999B7F-06E1-445D-BB5C-1267ED318B77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26999B7F-06E1-445D-BB5C-1267ED318B77}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -38,5 +44,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D0574C1A-B65D-4320-9952-5920D8893508} = {B14BC6AA-2080-4BB8-90A7-C83DDB6F2659}
{26999B7F-06E1-445D-BB5C-1267ED318B77} = {B14BC6AA-2080-4BB8-90A7-C83DDB6F2659}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ open System
[<EntryPoint>]
let main _ =
let isVisa = Dedge.Cardidy.Identify "4127540509730813" |> List.head = Dedge.CardType.Visa
let isVisa = Dedge.Cardidy.Identify "4127540509730813" |> Seq.head = Dedge.CardType.Visa
printfn "%b" isVisa
0
```
Expand Down
16 changes: 16 additions & 0 deletions src/AppFs/AppFs.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

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

<ItemGroup>
<ProjectReference Include="..\Dedge.Cardidy\Dedge.Cardidy.csproj" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions src/AppFs/Program.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[<EntryPoint>]
let main _ =
let card = "4127540509730813"
let isVisa = Dedge.Cardidy.Identify card |> Seq.head = Dedge.CardType.Visa
printfn "Is %s a visa: %b" card isVisa
0

0 comments on commit 7a3aba1

Please sign in to comment.