All Questions
Tagged with functional-programming f#
79 questions
3
votes
0
answers
266
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
0
answers
128
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
85
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
102
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:
...
3
votes
1
answer
301
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 ...
2
votes
1
answer
180
views
"Rock, Paper, Scissors +" in F#
During a discussion in a development chat, a user suggested to another (in the context of C# originally),
UserA: Challenge: Create an implementation of RPS, and then show how it can be extended to ...
3
votes
0
answers
136
views
Functional Dependency Injection Abstraction
The F# web-development framework Giraffe supports a functional style of Dependency Injection using a form of the Reader monad, as explained in this GitBook. I would like to use this pattern more ...
2
votes
1
answer
87
views
Assigning jobs in a functional style
I'm new to F# and functional programming in general (coming from an object oriented background). I just wanted to get some criticism on an algorithm for assigning jobs to crew members. I want to be as ...
3
votes
1
answer
402
views
4
votes
1
answer
152
views
Binary Trie in F#
I have this little exercise writing a binary trie in F#. In C# it can be done in few lines, but here it became more complicated than I had expected (especially the ...
3
votes
0
answers
274
views
Async in Railway Oriented Programming in F#
In F# the Railway Oriented Programming pattern can be implemented synchronously using the Result<'t,'terr> type as result value for functions, so they can be ...
4
votes
2
answers
339
views
Roman Numbers - The Functional Way
Yet another exercise in converting values between the decimal and roman number systems.
I have tried the functional way.
Any comments are welcome - but I'm especially interested in answers focusing ...
3
votes
1
answer
56
views
Concise way of "updating" element in nested collections
Imagine simple game:
...
3
votes
2
answers
627
views
Advent of Code 2018 day 1 part 2: find the first aggregated number that occures twice
I am using the coding puzzels of https://adventofcode.com for improving my F# skills.
Problem:
Day 1 Part 2:
Starting with frequency 0, a list of numbers should be added successive generating new ...
2
votes
0
answers
170
views
Lexer function to handle the '/' character
I'm writing a toy compiler, which is in a very early stage of development. The lexer contains the following block of code:
...