I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or whether it's better to use pattern matching.
I've got two functions which take an input and return Maybe SomeType.
If either returns Nothing, I also want
The do notation in this instance yields a nice advantage: if you want to
switch to a different monad to encapsulate failure you will meely need to
swap out the type signature and your function will need no further work.
On Aug 4, 2012 7:35 AM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat
Also if you don't need foo and bar you can write:
callFoo callBar return baz
//Johan
On Aug 4, 2012 8:36 AM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or whether it's better to use pattern matching.
I've got two functions which take
On Sat, Aug 4, 2012 at 7:05 AM, Alexander Solla alex.so...@gmail.com wrote:
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or
On Sat, Aug 4, 2012 at 7:05 AM, Alexander Solla alex.so...@gmail.com wrote:
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
...
With do notation, I can write something like this:
do
foo - callFoo x
bar - callBar x
return (baz)