[Haskell-beginners] anonymous arguments

harry voldermort at hotmail.com
Sun Dec 29 13:39:36 UTC 2013


Twan van Laarhoven <twanvl <at> gmail.com> writes:

> If you write
> 
>      map (foo 4 'f' (bar _) 5 'j')
> 
> How would the compiler know whether you meant
> 
>      map (\x -> foo 4 'f' (bar x) 5 'j')
> or
>      map (foo 4 'f' (\x -> bar x) 5 'j')
> ?

Interesting question, what does Scala do for this? I guess there would be a
rule of always binding to the outermost or innermost scope.






More information about the Beginners mailing list