The wiki says:
monadic functions (i.e. functions that use values from the monad as their arguments or return value).
My understanding is a function takes or returns a monad is monadic function, but it seems it has more strict definition when I came across this blog
The author said:
A monadic function is a function that produces a monadic value. (Note that we said nothing about its input type)
and
Functions of the form
f :: a -> m b
, wherea
is the type of the inner value of the monad. (Call these classic monadic functions)Functions of the form
f :: anything -> m b
, where the input of the function really doesn't matter. (Call these loose monadic functions)
It seems the definition is pretty strict and formal, but I can't find anywhere says anything about classic monadic functions, loose monadic functions.
So what precisely is a monadic function?