#Fsharp
24 notas · última:
Making program behaviour explicit | Pirrmann's train of thought
The post uses F# computation expressions to show how quoted expressions can be mutated before evaluation, producing unpredictable runtime behavior and even supporting mutation-testing-style replacements.
Functional Programming (F#) for C# Developers
The article explains core functional programming ideas and shows how C# can express them through immutability, pure functions, composition, and LINQ, with F# presented as the .NET functional language.
Memoization for a recursive function in F#
The post shows how to memoize a recursive F# solution for an Advent of Code puzzle, compares dictionary and map-based caches, and reports BenchmarkDotNet results.
Possibilities of abstractions
The article compares ways to abstract multiple implementations in F#: function records, interfaces, supplied functions, and discriminated unions. It weighs brevity, naming, optional parameters, documentation, and state handling.
Why I'm Ditching F# + Giraffe For Falco For Building WebApps
The author says Giraffe is still solid, but Falco’s simpler API, similar performance, and recent updates made it the new default for CloudSeed and future F# web apps.
How to handle external dependencies of your domain in a command-event architecture
The article compares five ways to handle external dependencies in a command-event architecture domain, from classic injection to the reader monad, and concludes in favor of internal commands with explicit dependencies.
Falco
Toolkit for building full-stack web applications in F# with ASP.NET Core, focused on simplicity, integration with .NET libraries, and features like routing, request handling, and authentication.
Why is F# code so robust and reliable?
The post argues that F# reduces bugs through immutability, exhaustive matching, no nulls by default, explicit errors, typed primitives, and explicit dependencies in functional code.
Domain-Driven Design meets Functional Programming
Interview with Scott Wlaschin on why DDD's demand for composable, autonomous subsystems fits functional programming better than OO does in practice.
O(n) Solution to the Multiply Others Problem in F#
Yan Cui walks through a division-free, O(n) F# solution to the classic interview question of multiplying every array element except itself.
Implementing rod-cutting
The article compares how the bottom-up rod-cutting algorithm translates from pseudocode into Python, Java, and F#, and argues that ceremony depends on the language and style, not just dynamic versus static typing.
A Game in F#? Why, yes indeed.
The post explains why the author made Truffle Wizard in F#, focusing on state reasoning, Elmish-style architecture, and why Fable and Feliz fit the game better than Unity or Raylib.
Succinct FSharp
An overview of F# basics through F# Interactive, covering bindings, types, collections, control flow, functions, pattern matching, records, unions, exceptions, classes, interfaces, and compiler directives.
Writing Concurrent Programs Using F# Mailbox Processors
The article explains F# mailbox processors through the actor model, then shows basic posting, replies, scanning, and a coordinator-worker setup that measures workload and charts per-agent results.
reF#actoring: rewriting an actor in F#
The article describes rewriting an Akka.NET Quartz scheduling actor in F# to reduce client dependencies on Quartz.NET and make the code more compact and idiomatic.
10 Tips for Productive F# Scripting
The post collects practical ways to work productively with F# scripts, from editing .fsx files and using FSI well to loading files, packages, assemblies, and timing code.
Domain-Driven Design (DDD) With F# and EventStore
The post presents a DDD implementation in F# with EventStore, using functional constructs, discriminated unions, and fold-based event application to keep domain logic explicit and isolated from infrastructure.
Converting a DSL to Executable F# Code On-the-Fly, Part 1
The post shows how to move from a hard-coded function to a replaceable F# function by modeling expressions with a discriminated union and interpreting them into executable code.
Options pricing in F#
The post explains option pricing in F# through stock-price modeling, then focuses on the binomial model, delta hedging, dividend adjustment, and both imperative and functional implementations.
Using “Project Euler” to Learn F# – Problems 6, 7, 8, 9 and 10
The post shows how to solve Project Euler problems 6, 7, 8, 9, and 10 in F#, using functions for sum squares, prime search, digit products, Pythagorean triplets, and prime summation.
Pipe Forward and Pipe Backward
The post reviews F# pipe-forward and pipe-backward operators, shows how they pass values between functions, and explains how composition operators help when chaining functions or changing precedence.
Why your F# evangelism isn't working
The article argues that F# still has not crossed the chasm from early adopters to pragmatists. Because pragmatists follow the herd and adopt only under pain, better explanations alone will not drive mainstream use.
Porting from C# to F#: Introduction
The series says a direct port from C# to F# is often not the best way to write F# code, and it lays out three levels of porting, from direct translation to type-driven design.
F# para programadores C# – Parte 2 – Aplicação de Funções
O post compara a aplicação de funções em F# com a invocação de métodos em C#, mostra a sintaxe para funções de um e dois argumentos e apresenta funções como valores de primeira classe.
