Hi All,
I thought I'd have a go at destructing
[1,2] >>= \n -> [3,4] >>= \m -> return (n,m)
which results in [(1,3)(1,4),(2,3),(2,4)]
I started by putting brackets in
([1,2] >>= \n -> [3,4]) >>= \m -> return (n,m)
This immediately fails when evaluated: I expect it's something to do
with the n
> return (n,m))
Any thoughts?
Matt
On 19 Jul 2013, at 23:35, Rogan Creswick wrote:
> On Fri, Jul 19, 2013 at 3:23 PM, Matt Ford wrote:
>> I started by putting brackets in
>>
>> ([1,2] >>= \n -> [3,4]) >>= \m -> return (n,m)
>>
>> This immediat
wrote:
> On Fri, Jul 19, 2013 at 3:58 PM, Matt Ford wrote:
>> Hi,
>>
>> Thanks for the help.
>>
>> I thought >>= was left associative? It seems to be in the examples from
>> Learn You A Haskell.
>>
>> I tried to use the associative