srghma
#1
https://idris2.readthedocs.io/en/latest/tutorial/interfaces.html#notation
useful notation
instead of
foo = do
x' <- bar
case x' of
Nothing -> ...
Just x'' -> ...
one can write
foo = do
case !bar of
Nothing -> ...
Just x'' -> ...
2 Likes
wclr
#3
More tempting exclamations to make less readable notations.
garyb
#4
I use this:
foo =
bar >>= case _ of
Nothing -> ...
Just x'' -> ...
5 Likes
srghma
#5
One can write
foo :: IO X
foo2 :: IO Y
bar :: X -> Y-> IO Z
main = log (show !(bar !foo !foo2))