Skip to content

Commit

Permalink
correct fsharp print statements in README.md (#87)
Browse files Browse the repository at this point in the history
- Added missing `printfn` statements for fsharp samples
- Changed a sample using `Console.WriteLine` to use `printfn` to be
consistent and idiomatic
  • Loading branch information
bradyjoslin committed May 16, 2024
1 parent 57cc422 commit 8532ff2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Console.WriteLine(output);
F#:
```fsharp
let output = plugin.Call("count_vowels", "Hello, World!")
printfn "%s" output
// => {"count": 3, "total": 3, "vowels": "aeiouAEIOU"}
```

Expand All @@ -96,9 +97,11 @@ Console.WriteLine(output);
F#:
```fsharp
let output1 = plugin.Call("count_vowels", "Hello, World!")
printfn "%s" output1
// => {"count": 3, "total": 6, "vowels": "aeiouAEIOU"}
let output2 = plugin.Call("count_vowels", "Hello, World!")
printfn "%s" output2
// => {"count": 3, "total": 9, "vowels": "aeiouAEIOU"}
```

Expand Down Expand Up @@ -153,7 +156,7 @@ let plugin2 =
new Plugin(manifest2, Array.Empty<HostFunction>(), withWasi = true)
let output2 = plugin2.Call("count_vowels", "Yellow, World!")
Console.WriteLine(output2)
printfn "%s" output2
// => {"count": 4, "total": 4, "vowels": "aeiouAEIOUY"}
```

Expand Down

0 comments on commit 8532ff2

Please sign in to comment.