... | ... | @@ -42,6 +42,30 @@ but not |
|
|
Just z -> z
|
|
|
```
|
|
|
|
|
|
|
|
|
Common uses of this extension are
|
|
|
|
|
|
|
|
|
```wiki
|
|
|
-- short-circuiting returns a la imperative languages
|
|
|
|
|
|
foo = do
|
|
|
...
|
|
|
if cond then return () else do
|
|
|
...
|
|
|
...
|
|
|
|
|
|
-- when using the FFI one commonly has a lot of nested alloca-like routines
|
|
|
|
|
|
foo = do
|
|
|
alloca $ \foo -> do
|
|
|
alloca $ \bar -> do
|
|
|
alloca $ \baz -> do
|
|
|
....
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
## References
|
|
|
|
|
|
|
... | ... | @@ -49,7 +73,6 @@ but not |
|
|
|
|
|
|
|
|
- Just a minor adjustment
|
|
|
- Pro
|
|
|
|
|
|
## Cons
|
|
|
|
... | ... | |