# \#beginners

**URL:** https://forums.fsharp.org/tag/beginners/1.md

[Latest](https://forums.fsharp.org/latest.md) · [Categories](https://forums.fsharp.org/categories.md) · [Tags](https://forums.fsharp.org/tags.md)

---

## [Ocaml vs .NET Performance](https://forums.fsharp.org/t/ocaml-vs-net-performance/5183)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 2\
**Last updated:** [August 22, 2026, 9:59pm UTC](https://forums.fsharp.org/t/ocaml-vs-net-performance/5183 "2026-08-22T21:59:34Z")

</div>

I became interested functor module of ocaml and wrote small program within: module type ORDERED = sig type t val compare : t -\> t -\> int end module MakeSet (Elt : ORDERED) = struct type elt = Elt.t type t = elt…

---

## [AOT Native support](https://forums.fsharp.org/t/aot-native-support/5169)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [July 30, 2026, 7:05pm UTC](https://forums.fsharp.org/t/aot-native-support/5169 "2026-07-30T19:05:43Z")

</div>

What needs to be done to be sure that the assembly will be fully operational? In F# of course :rofl:

---

## [Implement more than one interface with object expressions](https://forums.fsharp.org/t/implement-more-than-one-interface-with-object-expressions/5099)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [April 13, 2026, 2:22pm UTC](https://forums.fsharp.org/t/implement-more-than-one-interface-with-object-expressions/5099 "2026-04-13T14:22:06Z")

</div>

type IRunnable = abstract member Run: unit -\> unit type IPrintable = abstract member Print: unit -\> unit type Service() = class interface IRunnable with member \_.Run() = …

---

## [How to realise DCont with shift/reset via F#?](https://forums.fsharp.org/t/how-to-realise-dcont-with-shift-reset-via-f/4932)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 0\
**Last updated:** [October 13, 2025, 3:00am UTC](https://forums.fsharp.org/t/how-to-realise-dcont-with-shift-reset-via-f/4932 "2025-10-13T03:00:03Z")

</div>

I found F# Continuation Example · GitHub But that is not delimited continuations. Yet, I dont undestand why run take arg Cont\<'a, 'a\> if in type it ‘a → ‘r?

---

## [RemoteDesktopAssistant](https://forums.fsharp.org/t/remotedesktopassistant/4792)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 0\
**Last updated:** [July 30, 2025, 6:59am UTC](https://forums.fsharp.org/t/remotedesktopassistant/4792 "2025-07-30T06:59:01Z")

</div>

https://github.com/altbodhi/RemoteDesktopAssistant I tired typing password every time and written this program to improve works with many rdp connections. I made some improving. See last changes.

---

## [Can I use Microsoft.Graphics.Win2D in an F# project?](https://forums.fsharp.org/t/can-i-use-microsoft-graphics-win2d-in-an-f-project/4522)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 4\
**Last updated:** [July 11, 2025, 7:09am UTC](https://forums.fsharp.org/t/can-i-use-microsoft-graphics-win2d-in-an-f-project/4522 "2025-07-11T07:09:02Z")

</div>

I’d like to use an F# project to draw onto a Win2D CanvasControl in a WinUI3 application. The process would be something like: User does something - presses a button, slides a slider, etc. - in the WinUI3 application…

---

## [Memory usage after MailboxProcessor.Dispose()](https://forums.fsharp.org/t/memory-usage-after-mailboxprocessor-dispose/4399)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 3\
**Last updated:** [May 19, 2025, 6:36am UTC](https://forums.fsharp.org/t/memory-usage-after-mailboxprocessor-dispose/4399 "2025-05-19T06:36:46Z")

</div>

let mutable run = true \[ for i in 0 .. 1\_000\_000 -\> MailboxProcessor.Start(fun inbox -\> async { while run do let! msg = inbox.Receive() printfn "agent %d got message '%s'" i msg…

---

## [Encapsulating types for direct access](https://forums.fsharp.org/t/encapsulating-types-for-direct-access/4520)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 5\
**Last updated:** [May 14, 2025, 1:53am UTC](https://forums.fsharp.org/t/encapsulating-types-for-direct-access/4520 "2025-05-14T01:53:27Z")

</div>

module UserMod = type User = private | Young of age: uint | Audlt of age: uint let createUser (age: uint) : User = if age \> 17u then Audlt age else Young age let get = functi…

---

## [Shaping a type without requiring a type parameter?](https://forums.fsharp.org/t/shaping-a-type-without-requiring-a-type-parameter/4217)

<div class="topic-metadata">

**Author:** [@minitrope](https://forums.fsharp.org/u/minitrope)\
**Replies:** 1\
**Last updated:** [February 10, 2025, 2:56am UTC](https://forums.fsharp.org/t/shaping-a-type-without-requiring-a-type-parameter/4217 "2025-02-10T02:56:18Z")

</div>

Hello, I’m very new to F# and I’m exploring the idea of writing CI/CD pipelines with it. I wrote the following types: type Step\<'a\> = { Name: string; GetContext: (unit -\> 'a); Run: ('a -\> unit) } type CompositeStep\<'…

---

## [How to use the same time as well as the bank](https://forums.fsharp.org/t/how-to-use-the-same-time-as-well-as-the-bank/4063)

<div class="topic-metadata">

**Author:** [@bdurhrhydy](https://forums.fsharp.org/u/bdurhrhydy)\
**Replies:** 2\
**Last updated:** [February 8, 2025, 5:01am UTC](https://forums.fsharp.org/t/how-to-use-the-same-time-as-well-as-the-bank/4063 "2025-02-08T05:01:26Z")

</div>

How to make a raha tha tab bhi nahi hua tha tab Tak hai sab kuch hai lekin ye sab kuch

---

## [Amazing result hand made search with F#](https://forums.fsharp.org/t/amazing-result-hand-made-search-with-f/4110)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [February 7, 2025, 4:40am UTC](https://forums.fsharp.org/t/amazing-result-hand-made-search-with-f/4110 "2025-02-07T04:40:49Z")

</div>

I am reading Algoritms Nikolas Wirt and re-write find substring by example from book module Text = /// поиск индекс первого вхождения образца в строке let findFirst (s: string) (p: string) = …

---

## [Encapsulation in functional program](https://forums.fsharp.org/t/encapsulation-in-functional-program/4153)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [February 4, 2025, 12:15pm UTC](https://forums.fsharp.org/t/encapsulation-in-functional-program/4153 "2025-02-04T12:15:25Z")

</div>

I need good example encapsulation with module but without using classes. In pure functional style.

---

## [Access to the Slack](https://forums.fsharp.org/t/access-to-the-slack/3896)

<div class="topic-metadata">

**Author:** [@jchristensen](https://forums.fsharp.org/u/jchristensen)\
**Replies:** 3\
**Last updated:** [February 3, 2025, 6:45pm UTC](https://forums.fsharp.org/t/access-to-the-slack/3896 "2025-02-03T18:45:13Z")

</div>

Hey guys, I tried registering for an fsharp foundation account a while back, and then clicked the button to become a Member (free tier), with the intent of getting access to the community Slack server, but at that time …

---

## [Writing OData service with F#?](https://forums.fsharp.org/t/writing-odata-service-with-f/1268)

<div class="topic-metadata">

**Author:** [@cil22](https://forums.fsharp.org/u/cil22)\
**Replies:** 2\
**Last updated:** [January 30, 2025, 10:18am UTC](https://forums.fsharp.org/t/writing-odata-service-with-f/1268 "2025-01-30T10:18:20Z")

</div>

Hello, I just finished a first small app with F# and Suave, providing a Web API interface (REST). Now I thought about further development of the API by implementing the ODATA protocol. However, it is very hard finding…

---

## [Unexpected NullReferenceException in (pure?) F# unit test](https://forums.fsharp.org/t/unexpected-nullreferenceexception-in-pure-f-unit-test/2219)

<div class="topic-metadata">

**Author:** [@acorello](https://forums.fsharp.org/u/acorello)\
**Replies:** 7\
**Last updated:** [January 11, 2025, 3:38pm UTC](https://forums.fsharp.org/t/unexpected-nullreferenceexception-in-pure-f-unit-test/2219 "2025-01-11T15:38:43Z")

</div>

Hello, I’ve been learning F# for the past couple of weeks and I just encountered something quite unexpected. Can someone explain why? I suspect it’s related to how FsUnit instantiates the test cases… but it also seems …

---

## [Object Initializer: "The object constructor ... has no argument or settable return property..."](https://forums.fsharp.org/t/object-initializer-the-object-constructor-has-no-argument-or-settable-return-property/3930)

<div class="topic-metadata">

**Author:** [@Spearruleina](https://forums.fsharp.org/u/Spearruleina)\
**Replies:** 1\
**Last updated:** [December 12, 2024, 2:26pm UTC](https://forums.fsharp.org/t/object-initializer-the-object-constructor-has-no-argument-or-settable-return-property/3930 "2024-12-12T14:26:56Z")

</div>

Hi, I have looked around the Googular response (only really seen one: f# - Object initialization syntax - Stack Overflow ; ) and hit my head against a wall on this a couple of different times, but now it bugs me enoug…

---

## [Error building project that uses FSharp.Data.Sql.SqlTypeProvider](https://forums.fsharp.org/t/error-building-project-that-uses-fsharp-data-sql-sqltypeprovider/3141)

<div class="topic-metadata">

**Author:** [@RicoSaupe](https://forums.fsharp.org/u/RicoSaupe)\
**Replies:** 3\
**Last updated:** [December 11, 2024, 8:50am UTC](https://forums.fsharp.org/t/error-building-project-that-uses-fsharp-data-sql-sqltypeprovider/3141 "2024-12-11T08:50:13Z")

</div>

Hi I have a net7.0 class library which includes the following packages \<Project Sdk="Microsoft.NET.Sdk"\> \<PropertyGroup\> \<TargetFramework\>net7.0\</TargetFramework\> \<GenerateDocumentationFile\>true\</…

---

## [How can I upload an image to these forums?](https://forums.fsharp.org/t/how-can-i-upload-an-image-to-these-forums/3644)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 2\
**Last updated:** [August 9, 2024, 8:56am UTC](https://forums.fsharp.org/t/how-can-i-upload-an-image-to-these-forums/3644 "2024-08-09T08:56:10Z")

</div>

I tried to upload a PNG to the forums in another thread but got an error message: Sorry, there was an error uploading Screenshot 2024-05-30 124646.png. Please try again. I tried converting the image to a PNG and WEBP an…

---

## [Is there a better way to replace only the first element in a sequence?](https://forums.fsharp.org/t/is-there-a-better-way-to-replace-only-the-first-element-in-a-sequence/3724)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 8\
**Last updated:** [September 24, 2024, 12:53pm UTC](https://forums.fsharp.org/t/is-there-a-better-way-to-replace-only-the-first-element-in-a-sequence/3724 "2024-09-24T12:53:06Z")

</div>

I’ve got a sequence of chars where I want to replace only the first char with the upper-case version of that first char. The sequence may have zero, one or more elements. If there is more than one element then the first…

---

## [Numerical code, floating point divergence](https://forums.fsharp.org/t/numerical-code-floating-point-divergence/3720)

<div class="topic-metadata">

**Author:** [@patrick-nicodemus](https://forums.fsharp.org/u/patrick-nicodemus)\
**Replies:** 6\
**Last updated:** [August 29, 2024, 8:50am UTC](https://forums.fsharp.org/t/numerical-code-floating-point-divergence/3720 "2024-08-29T08:50:18Z")

</div>

Hi all; What is wrong with the following code? It prints “Infinity” when I run it in the interactive interpreter. let pi\_approx = let rec sum n accum = if n = 0 then accum else sum (n - 1) (accum + (1. / (float (n …

---

## [Type abbreviations and private fields](https://forums.fsharp.org/t/type-abbreviations-and-private-fields/3710)

<div class="topic-metadata">

**Author:** [@patrick-nicodemus](https://forums.fsharp.org/u/patrick-nicodemus)\
**Replies:** 8\
**Last updated:** [August 29, 2024, 8:49am UTC](https://forums.fsharp.org/t/type-abbreviations-and-private-fields/3710 "2024-08-29T08:49:38Z")

</div>

The behavior for type abbreviations and the private keyword is difficult to understand. module Pair = type private pair = int \* string let f x y : pair = (x, y) open Pair printf "%d" (fst (f 3 "Hello")) (\* Pr…

---

## [F# vs C# performance](https://forums.fsharp.org/t/f-vs-c-performance/3605)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 3\
**Last updated:** [June 8, 2024, 3:15am UTC](https://forums.fsharp.org/t/f-vs-c-performance/3605 "2024-06-08T03:15:44Z")

</div>

I do not understand why F# so slow let inline swap\<'a\> (a: byref\<'a\>, b: byref\<'a\>) = let t = a a \<- b b \<- t let sort arr = let ln = Array.length arr for i = 0 to ln - 1 do for j = 0 to ln…

---

## [Can I ‘streamline’ this benchmarking code?](https://forums.fsharp.org/t/can-i-streamline-this-benchmarking-code/3642)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 2\
**Last updated:** [May 31, 2024, 8:07am UTC](https://forums.fsharp.org/t/can-i-streamline-this-benchmarking-code/3642 "2024-05-31T08:07:25Z")

</div>

I’m using VSCode and Benchmark.NET to do some benchmarking on some F# code. In this specific case, I’d like to have two types of benchmark: “Full” (RunStrategy.Throughput) and “Quick” (RunStrategy.Monitoring with low it…

---

## [Module initialize](https://forums.fsharp.org/t/module-initialize/3613)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 3\
**Last updated:** [May 3, 2024, 7:48pm UTC](https://forums.fsharp.org/t/module-initialize/3613 "2024-05-03T19:48:00Z")

</div>

module Test printfn "hello" Why if it module load in fsx in console will be printed message, but in fspro if open module it does not? In most languages with modules if we uses module it always init. for example Визуал…

---

## [Is there a better way to get the names of record fields?](https://forums.fsharp.org/t/is-there-a-better-way-to-get-the-names-of-record-fields/3603)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 3\
**Last updated:** [April 25, 2024, 8:39am UTC](https://forums.fsharp.org/t/is-there-a-better-way-to-get-the-names-of-record-fields/3603 "2024-04-25T08:39:12Z")

</div>

(While this question talks about SQL, because that’s what I’m using at the moment, it’s more of a generalised question really.) I’ve got some code in which I am generating SQL queries which will be passed to a C# librar…

---

## [Record type is equals of hashmap (clojure)?](https://forums.fsharp.org/t/record-type-is-equals-of-hashmap-clojure/3574)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [March 11, 2024, 2:50pm UTC](https://forums.fsharp.org/t/record-type-is-equals-of-hashmap-clojure/3574 "2024-03-11T14:50:41Z")

</div>

In hash-map - clojure.core | ClojureDocs - Community-Powered Clojure Documentation and Examples when it change it make new leaf with old struct and new changed fields. Is it right for record type when it do { x with som…

---

## [Question about preferences for record/DU declaration formatting](https://forums.fsharp.org/t/question-about-preferences-for-record-du-declaration-formatting/3576)

<div class="topic-metadata">

**Author:** [@GarryP](https://forums.fsharp.org/u/GarryP)\
**Replies:** 0\
**Last updated:** [March 11, 2024, 1:44pm UTC](https://forums.fsharp.org/t/question-about-preferences-for-record-du-declaration-formatting/3576 "2024-03-11T13:44:17Z")

</div>

Records How do you prefer to declare records which have many fields? The guidelines here GitHub - G-Research/fsharp-formatting-conventions: G-Research F# code formatting guidelines specify this as preferred: type Post…

---

## [I don't understand optional parameters](https://forums.fsharp.org/t/i-dont-understand-optional-parameters/3575)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [March 11, 2024, 8:29am UTC](https://forums.fsharp.org/t/i-dont-understand-optional-parameters/3575 "2024-03-11T08:29:16Z")

</div>

https://fsprojects.github.io/FSharp.Data/reference/fsharp-data-http.html#Request ?body is optional, but i can not pass it as None. Why? I want to make single call for GET and POST but it forbids me this.

---

## [Create animated gif?](https://forums.fsharp.org/t/create-animated-gif/2287)

<div class="topic-metadata">

**Author:** [@Bob-McCrory](https://forums.fsharp.org/u/Bob-McCrory)\
**Replies:** 1\
**Last updated:** [February 29, 2024, 3:55am UTC](https://forums.fsharp.org/t/create-animated-gif/2287 "2024-02-29T03:55:28Z")

</div>

In a Jupyter notebook with Julia, I can easily create an animated gif file using the @animate macro. Is there any similar way to do so in F#/Jupyter? Thanks for looking.

---

## [Dotnet fsi #cd and #silentcd](https://forums.fsharp.org/t/dotnet-fsi-cd-and-silentcd/3545)

<div class="topic-metadata">

**Author:** [@altbodhi](https://forums.fsharp.org/u/altbodhi)\
**Replies:** 1\
**Last updated:** [February 22, 2024, 1:18pm UTC](https://forums.fsharp.org/t/dotnet-fsi-cd-and-silentcd/3545 "2024-02-22T13:18:23Z")

</div>

i notice fsi sometimes invoke these commands: #cd and #silentcd, but i not found description of them. Can you help me with it?

[Next page](https://forums.fsharp.org/tag/beginners/1.md?match_all_tags=true&page=1&tags%5B%5D=beginners)
