Logo RΞCURSION
  • Home
  • About
  • Recent Posts
  • Projects
  • Posts
  • Notes
  • Docs
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Posts
  • Introduction
  • Programming
    • Code Sustainability
      • Error Handling
        • Exception Handling in Python
      • Succint FSharp
        • Currying and Partial Application
        • A Better Way to Manage Dependencies in F#
        • Memoization in F#
        • Pattern Matching in F#
        • Understanding the F# Option Type
    • Functional Programming
      • Functional Programming Nuances
      • Functors and Monads in F#
    • Languages
      • fsharp
        • fsharp-9-review
  • Quantitative-Finance
    • Portfolio Risk Attribution
    • Simple Moving Average
Hero Image
Understanding Functors and Monads in F# with Statistical and Financial Models

This blog post demystifies functors and monads in F# through real-world statistical and financial modeling examples. Learn how Option, Result, and Async types simplify handling missing data, errors, and asynchronous computations, enabling robust and composable code for data processing, risk modeling, and Monte Carlo simulations.

  • functional programming
  • F#
  • language features
Monday, April 28, 2025 | 8 minutes Read
Hero Image
What’s New in F# 9 for Quant Developers

Unlike general-purpose updates, many of F# 9’s features are particularly well-aligned with the needs of quantitative professionals—those who balance mathematical modeling, financial computation, and high-integrity codebases. These improvements refine the language’s functional core while addressing practical challenges faced in real-world applications, such as code readability, workflow modularity, and precision in data modeling. In this post, I’ll walk through some of the key updates in F# 9 and explore how they can improve the way we write and structure quantitative code.

  • functional programming
  • F#
  • language features
Wednesday, April 23, 2025 | 8 minutes Read
Hero Image
Optimizing Pattern Matching in F# for Better Performance

Pattern matching is one of the most powerful features of functional we can employ to ensure more expressive and easier-to-read code. However, handling large data structures may require optimal pattern matching to avoid performance. This article explores techniques to optimize pattern matching in F# by minimizing unnecessary computations and improving efficiency. Common Performance Issues in Pattern Matching Although pattern matching improves code readability, improper use can lead to inefficiencies. Some common issues include:

  • F#
  • Optimization
  • Functional Programming
  • Pattern Matching
  • Software Development
Monday, March 3, 2025 | 5 minutes Read
Hero Image
Memoization with Fibonacci

Memoization, commonly known as caching is a key technique we can use for performance optimization in programming. Memoization simply stores the results from a previous computation for later retrieval whenever the arguments are presented again. The ability to re-use these, often expensive functions, brings significant performance improvements - especially in scenarios with repetitive computations. In F#, memoization is not only a helpful optimization but also a natural fit due to the language’s immutable data structures and functional nature.

  • F#
  • Optimization
  • Functional Programming
  • Caching
  • Software Development
Monday, November 4, 2024 | 10 minutes Read
Hero Image
A Better Way to Manage Dependencies in F#

The default go-to tool for most .Net developers is NuGet. It simplifies handling dependencies across projects and also provides a central reference point for reusable .Net components. Due to its initial development and growth over time, NuGet poses a few shortcomings evident over the years. As an alternative, specifically for F# developers, Paket is an open source dependency manager for .Net projects that was originally built with the primary goal of addressing some of the shortcomings developers encountered when managing dependencies in large and complex projects.

  • F#
  • Paket
  • NuGet
  • Dependency Management
  • Open Source
  • Software Development
  • Project Management
Tuesday, October 22, 2024 | 7 minutes Read
Hero Image
Currying and Partial Application in F#

The mathematical definition of a function can be denoted as a relationship between a set of inputs (the domain) and a single output (the co-domain). When a mathematical function is said to have only one parameter, it typically means that it takes a single value as input. However, in functional programming we build functions that theoretically “defy” this concept by taking in multiple input parameters. Traditionally, a mathematical function may only accept one input at a time.

  • F#
  • Functions
  • Code Sustainability
Monday, October 7, 2024 | 5 minutes Read
Hero Image
Enhancing Code Maintainability with the F# 'Option' Type

A common case in programming is handling variables that might or might not hold a value. The C# language for example, uses Nullable<T> to represent such cases. This enables you to declare variables as nullables that would otherwise not be assigned to Nulls (e.g a float or an int). Handling these null references in languages like C# or Java can often lead to bugs. A clean and powerful solution to this problem is provided in F#: the Option type.

  • F#
  • Functions
  • Code Sustainability
Tuesday, September 17, 2024 | 4 minutes Read
Hero Image
Mastering Python's Exceptional Complexity

Introduction Exception handling is a fundamental pillar of programming, and Python in particular, excels in this area given its robust and versatile error management system. A program terminates immediately it encounters an error, typically taking one of two forms: syntax errors and exceptions. In this article, we’ll demystify exceptions, distinguishing them from syntax errors, and explore the art of effectively managing them. Finally, we will look at some advanced techniques coupled with best practices for gracefully handling exceptions.

  • Python
  • Exceptions
  • Code Sustainability
Thursday, September 14, 2023 | 8 minutes Read
Hero Image
Functional Programming

Functional programming (FP) is more than just a programming paradigm; it’s a way of thinking about software development that has gained significant traction in recent years. This post aims to demystify functional programming and explore its practical implications. What is Functional Programming? At its core, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It emphasizes: Pure Functions: Functions that always produce the same output for the same input and have no side effects.

  • functional programming
  • language features
Thursday, April 20, 2023 | 3 minutes Read
Navigation
  • About
  • Recent Posts
  • Projects
Contact me:
  • carlvinjerry@gmail.com | cmwange@beyondrawdata.co.ke
  • carlvinjerry
  • Carlvin Jerry Mwange
  • +254 (0)747 942 588
  • Carlvin Jerry Mwange

Liability Notice: This theme is under MIT license. So, you can use it for non-commercial, commercial, or private uses. You can modify or distribute the theme without requiring any permission from the theme author. However, the theme author does not provide any warranty or takes any liability for any issue with the theme.


Toha Theme Logo Toha
© 2020 Copyright.
Powered by Hugo Logo