lewisjkl blog
  • Home

functional-programming

A collection of 4 posts
scala

Http4s Client Middleware

A client middleware is something that you can add on to a Client to extend its functionality. Some examples of this would be: * Logging middleware that logs response status codes/headers/etc * Tracing middleware that wires in functionality for Open Tracing or similar * Authentication middleware that would automatically add an
31 Jan 2025 3 min read
scala

Higher Kinded Types

Higher kinded types are types which take types which take types as parameters. I know, it burns the eyes just to read that sentence. So let's try to break it down. A type which takes a type is something we've already dealt with in a prior
24 Nov 2024 5 min read
scala

Generic Types

Generic types in Scala allow for abstractions that cover different, potentially unrelated, types. A good example is the List type in Scala. If it weren't for generics, we'd have two main options for implementing lists: 1. Create a different List type for each type of elements
21 Nov 2024 6 min read
functional-programming

Cats Effect Ref

As a newcomer to functional programming, I thought mutability was prohibited. Although I figured out how to use immutability in most situations, I found there were obvious cases where it doesn’t work such as modeling and updating in-memory state (e.g. in-memory caches and counters). I was wrong to
17 Feb 2020 8 min read
Page 1 of 1
lewisjkl blog © 2025
  • Sign up
Powered by Ghost