F# function calling syntax confusion
        Posted  
        
            by Daniel
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Daniel
        
        
        
        Published on 2010-04-27T21:16:11Z
        Indexed on 
            2010/04/27
            21:23 UTC
        
        
        Read the original article
        Hit count: 207
        
F#
I have a piece of code:
links
    |> Seq.map (fun x -> x.GetAttributeValue ("href", "no url"))
Which I wanted to rewrite to:
links
    |> Seq.map (fun x -> (x.GetAttributeValue "href" "no url"))
But the F# compiler doesn't seem to like that. I was under the impression that these two function calls were interchangeable:
f (a, b)
(f a b)
The error that I get is:
The member or object constructor 'GetAttributeValue' taking 2 arguments are not accessible from this code location. All accessible versions of method 'GetAttributeValue' take 2 arguments.
Which seems amusing, as it seems to indicate that it needs what I'm giving it. What am I missing here?
© Stack Overflow or respective owner