Questions tagged [f#]
F# is a succinct, expressive, and efficient functional and object-oriented language for .NET
350 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
147
views
F# - Recursively find the first available item in a range definition
I have the following EF Core table:
...
4
votes
2
answers
919
views
F# railway style vs lazy seq
The following code is an example of railway-oriented programming that allows a password string to be validated:
...
3
votes
2
answers
137
views
Convert environment variables (from linux env cmd) to json (supporting nestedness) in plain F#
I stumbled across something a long while ago, fetching the environments variables from say env under linux (say on a pod via argos), anyway, point is I could fetch ...
0
votes
1
answer
157
views
Returning different elements between a Hashtable and list<string> in F#
I have two collections:
A list of strings
A hashtable
...
3
votes
0
answers
275
views
Command line wordle
I am seeking a review of my command line wordle game.
Having only recently started exploring functional programming, I expect that there will be no shortage of areas to improve. This is my first ...
2
votes
1
answer
206
views
Sieve of Eratosthenes in F#
after looking at the pseudocode for the Sieve of Eratosthenes on wikipedia I tried implementing a similar version using F#. The code runs just fine, that is, it returns all prime numbers up until a ...
2
votes
0
answers
136
views
Download and parse XML data from a URL every minute with F#
The purpose
This code is intended to achieve the following goals:-
Create a hard coded list of lifts, this is pretty static and I add some extra info so I'm ok with this being in the code but I may ...
1
vote
1
answer
104
views
Cardinal to ordinal numbers in F# code reuse
I've been experimenting with the F# Bolero environment to learn F# a bit and I was trying to get the hang of pattern matching by generating ordinal numbers (1st, 2nd, 3rd, ...) from cardinal numbers (...
2
votes
1
answer
115
views
F# simple monoalphabetic cipher code implementation
I am a new F# programmer, and a student in a security class. As part of my notes, I wrote a small implementation of a monoalphabetic cipher as follows:
...
2
votes
1
answer
101
views
Retrying failed calls to a crypto exchange
This code represents logic used to retry failed calls to a crypto exchange:
...
2
votes
3
answers
187
views
How to refactor the boolean logic of this F# function?
I have a list of path I want to filter out. I want to keep only paths matching a specific pattern and remove all paths matching another specific pattern.
To achieve this I pattern matched on each ...
-1
votes
1
answer
138
views
What would be this best way to show that my function can accept some specific numbers as input? [closed]
I am writing a credit card generator. I have method GenerateVisa() who will return either a 13 or 16 numbers string.
This is the default value but GenerateVisa can ...
3
votes
1
answer
328
views
Print each word of a sentence in a new line
this is my first F# program, very simple concept but took me a few minutes to get it. I'm new to functional programming so I'd appreciate if you could have a look ...
0
votes
1
answer
97
views
Downloading multiple log files
This code succeeds in downloading log text files from multiple URLs. Can this be made more efficient?
...
1
vote
2
answers
923
views
What would be the idiomatic F# way to write optional parameters?
In the context of a library to generate random credit card, it would be nice to let the user the possibility to set some optional options on some cards. Lets take Visa. Two lengths are available: 13 ...