Jindřich Ivánekjindraivanek.hashnode.dev·Jul 31, 2023FeaturedCurious case of List.contains performanceSome time ago, colleagues stumbled upon a case where List.contains was significantly slower than identical use of List.exists. List.contains and List.exists are functions from F# standard library, where List.contains x xs check if the list xs contai...Discuss·14 likes·270 reads#fsharp
Brett Rowberrybrettrowberry.com·Jun 10, 2023AttributesI use a library called Pathom3. The Getting Started page opens with Pathom is a Clojure/script library to model attribute relationships. The README states Logic engine for attribute processing for Clojure and Clojurescript. There are a few big id...Discuss·10 likes·68 readsPathomClojure
Charles Farrisblog.sleepingbearsystems.com·Apr 14, 2023ArtShowTools: Part 3In the previous post, I used event sourcing to handle commands and recreate the current state of the Artwork entity. In this post, I'll be adding validation to the value objects used to implement the command and event objects. The ArtworkId Value Obj...Discuss·1 likeArtShowToolsF#
Charles Farrisblog.sleepingbearsystems.com·Apr 3, 2023ArtShowTools: Part 2In my previous post (ArtShowTools: Part 1), I created the first draft of the domain model. In this post, I'll describe some of the prototyping I've been doing in F#. While I've worked with C# for nearly 20 years, I've only been working with F# for ab...DiscussArtShowToolsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 25, 2023Basics 26 - Computation ExpressionsWhat are Computation Expressions? Computation Expressions (CE's) in F# are all about syntactic convenience. There are two different aspects: Using existing CEs: seq, query, async, task and lazy Building new/custom CEs, aka building CE builder types...Discuss·47 readsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 24, 2023Basics 25 - Classes and InterfacesLearning-FSharp/Ch25-OOP-Classes/Program.fs Check out all the comments that are placed in the source file. The objective of this article is to give you an overview of classes and interfaces in F# through various examples. Before We Begin Throughout t...Discuss·40 readsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 17, 2023Basics 24 - Active Patternshttps://youtu.be/GPCOoB778DM This article is a continuation of Basics 09 - Pattern Matching (Basics). Learning-FSharp/Ch24-ActivePatterns/Program.fs Check out all the comments that are placed in the source file. Before We Begin Let's take a simple ...Discuss·89 readsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 11, 2023Basics 23 - Types (Part 2) - Extending Typeshttps://youtu.be/7sNpvt8MUqg Learning-FSharp/Ch23-ExtendingTypes/Program.fs Check out all the comments that are placed in the source file. Extending Your Types Here's an example of a discriminated union with static and instance members: // Discrimi...Discuss·75 readsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 11, 2023Basics 22 - Inline Functionshttps://youtu.be/pHXPFHSFI00 A Simple Case... Not Really Let's take a simple example: let add x y = x + y let result = add 1 2 So far so good. We created a function named add. Since no type declarations are used, we assume that x, y and return va...Discuss·1 like·77 readsF#
Ankur Kashyapthinkfunctionally.hashnode.dev·Mar 10, 2023Basics 21 - Recursive Functionshttps://youtu.be/4Dbr0CSi9I4 What are Recursive Functions Recursive functions are the ones that call themselves. Recursive functions are commonly used in F#. The keyword rec is used for creating recursive functions: let funcName = .... let rec func...Discuss·79 readsF#