Tuesday, April 27, 2010

F# weirdness of the day...

I have a piece of code that says:
links
    |> Seq.map (fun x -> x.GetAttributeValue ("href", "no url"))

Which I wanted to rewrite to "the other syntax" accepted by F#:
links
    |> Seq.map (fun x -> (x.GetAttributeValue "href" "no url"))

But I have no luck. The amusing thing is the error message I get from Visual Studio:
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.
Say what?

[p.s. I posted this to Stack Overflow to in hopes of getting a bit of wisdom. Check there for possible answers.]

2 comments:

Aluink said...

so why has this blog died?

dstcruz said...

That's a very good question :) I'll make sure to ask ;)