[Haskell-cafe] How about a special syntax for generalised (= MonadPlus) comprehension?
Alexey Muranov
alexey.muranov at gmail.com
Sun May 15 15:36:25 UTC 2016
On Sunday, May 15, 2016 at 5:20:42 PM UTC+2, Alexey Muranov wrote:
>
> Then matching analogs of `[]` and `[1,2,3]` could be made:
>
> ```
> {||} :: Maybe Int -- Nothing
> {| Just 1, Just 2, Just 3 |} :: Maybe Int -- Just 1
> ```
>
Sorry, i meant of course
```
{|1, 2, 3|} :: Maybe Int -- Just 1
```
Alexey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160515/02bc5f06/attachment.html>
More information about the Haskell-Cafe
mailing list