
20 May
2014
20 May
'14
3:47 p.m.
On 05/20/2014 08:44 PM, Tillmann Rendel wrote:
Hi,
silvio wrote:
[...] This should cover the lambda question and the nested question.
No, I don't understand how this covers the lambda case. For example, how is the following desugared:
do print (map (\name -> {readFile name}) ["foo", "bar"])
It would be convenient if this would mean something like:
do contents <- mapM (\name -> readFile name) ["foo", "bar"] print contents
I see sorry I didn't consider that there would be new variables. syntax changed from {exp} to (<-exp) An other thing to consider is functions. This seems really awesome syntax. Unfortunately, this might cause some troubles because functions can be monads. do print map (<-readFile) ["foo","bar"] silvio