Incomplete loop in Elm

Does Elm have an expression that creates bottom / divergences like Haskell erroror Rust unimplemented!()?

eg.

map : (a -> b) -> List a -> List b
map = unimplemented
+4
source share
1 answer

Yes, it Debug.crashhas a type String -> athat you can use as follows:

map : (a -> b) -> List a -> List b
map = Debug.crash "unimplemented"
+7
source

Source: https://habr.com/ru/post/1692018/


All Articles