BigFont Blog
  • Home
  • About
  • Bibliography (Work)

functional-programming

A collection of 4 posts

How is it possible that the default implementations of Haskell's Bifunctor first and second compose?
category-theory

How is it possible that the default implementations of Haskell's Bifunctor first and second compose?

I've been studying the category theory for about three months now. Recently, I felt surprised with the definition of Haskell's Bifunctor: class Bifunctor f where // type signatures bimap :: (a -> c) -&

  • Shaun Luttin
    Shaun Luttin
3 min read
typescript

filter undefined and null values from an array while still satisfying TypeScript's strict null checks.

In strict mode, TypeScript makes it illegal to assign an array of type (T | undefined) to an array of type T[]. This prevents bugs by preventing us from dotting into (de-referencing) an undefined

  • Shaun Luttin
    Shaun Luttin
1 min read
typescript

Error handling with an Either type in TypeScript.

type Result<T> = T | Error; const someFunc = (isError: boolean): Result<string> => { if (isError) { return new Error(); } return 'Success!'; }; const otherFunc = (isError: boolean): Result<number> =>

  • Shaun Luttin
    Shaun Luttin
1 min read
programming

My Functional Programming Notes

DRAFT These are concise, early learning functional programming notes from these sources: https://wiki.haskell.org/Typeclassopedia https://www.manning.com/books/concurrency-in-dotnet https://stackoverflow.com/a/4412319/1108891 talks about how C#

  • Shaun Luttin
    Shaun Luttin
2 min read
BigFont Blog © 2021
Latest Posts Ghost