[Haskell-beginners] Variable re-use

Stanislaw Findeisen stf.list.haskell at eisenbits.com
Sun May 3 11:02:22 UTC 2015


On 2015-04-28 12:15, Alexey Shmalko wrote:
> I'm sorry, my example should've been:
> 
> [1,2,3] >>= \a -> [a+1] >>= \a -> return a

Or just:

[1,2,3] >>= (return . (+1))

-- 
http://people.eisenbits.com/~stf/
http://www.eisenbits.com/

OpenPGP: 9EC2 5620 2355 B1DC 4A8F  8C79 0EC7 C214 E5AE 3B4E

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150503/ac70f2e3/attachment.sig>


More information about the Beginners mailing list