functional-programminglanguage-agnostic

What is a Nothing->Nothing function called in FP?


I am a beginner to functional programming where most of my experience comes from Java/Kotlin. From my understanding functional programming has special names for certain function signatures.

  1. Type -> Boolean functions are called Predicates.
  2. Type -> Nothing functions are called Consumers.
  3. Nothing -> Type functions are called Suppliers.

Is there an equivalent name for a Nothing -> Nothing function?


Solution

  • Thank you all for commenting on my post. I will be accepting the comment made by @Sylwester as the answer.

    Functional programming doesn't have Type -> Nothing and Nothing -> Type is basically a constant since the return value will always be the same. Nothing -> Nothing would be the same, but with "Nothing" as the value. In other languages sending in the same (or nothing) and getting different results and sending in parameters and get the same nothing result makes sense due to side effects (IO, mutation, ...) however since FP does not have this there shouldn't be such functions.