Unsafe functions that CRASH when called.
Really. It's for educational purposes. So go ahead and read the source and meditate on it. Don't use it.
OK OK. There is only one legitimate use case: when you have a logical proof that calling a function is impossible.
Do you have a logical proof? If not, use Maybe.
Create a stack overflow which throws a javascript exception.
Briefly uses a lot of CPU and memory so interactivity suffers. You should use exception instead.
Throws the following exception:
Internal Error: Too much recursionThrows a javascript exception immediately.
This is achieved by comparing two functions.
The error is even more cryptic than stackOverflow, but the CPU, memory and interactivity are not stressed.
Throws the following exception:
Error: Trying to use `(==)` on functions.
There is no way to know if functions are "the same" in the Elm sense.
Read more about this at https://package.elm-lang.org/packages/elm/core/latest/Basics#== which describes why it is this way and what the better version will look like.
Go into an infinite loop.
The browser tab will become unresponsive. CPU use will increase, potentially impacting machine usability and battery life. Because of Tail Call Optimization, the stack will not overflow, instead the browser will show a button to reload the tab after a timeout.