Decorators – In Python, we can preface a function with a decorator (a line beginning with
@) to make some kind of tweak or assign some extra meaning to the decorated function. Although Haskell does not have a specific language feature that mirrors Python decorators, there are a lot of examples in Haskell that follow the same pattern.
Data classes – The primary role of a Python data class is to simply hold the values that were passed as constructor arguments. This feature strongly resembles Haskell datatypes, particularly when we use Haskell’s record syntax.