gleam icon indicating copy to clipboard operation
gleam copied to clipboard

Gleam patterns documented

Open lpil opened this issue 3 months ago • 0 comments

If you have experience with OOP or some other non-functional paradigm then it may be unclear how to write your code. Documenting common design patterns would be helpful!

An existing one for Haskell: https://kowainik.github.io/posts/haskell-mini-patterns

What should we cover?

  • Tail calls with an accumulator
  • Making invalid states unrepresentable
  • Result error wrapping
  • The builder pattern
  • Opaque types and smart constructors
  • Phantom types
  • ???

lpil avatar Mar 15 '24 11:03 lpil