F# static member

Posted by HeMan on Stack Overflow See other posts from Stack Overflow or by HeMan
Published on 2010-03-07T23:48:34Z Indexed on 2010/03/07 23:53 UTC
Read the original article Hit count: 301

Filed under:

I was working through the PDC 2008 F# videos and seem to run into a problem type StockAnalyzer (lprices, days) = let prices = lprices |> Seq.map snd |> Seq.take days static member GetAnalyzers(tickers, days) = tickers |> Seq.map loadPrices |> Seq.map (fun prices -> new StockAnalyzer(prices, days))

 member s.Return = 
    let lastPrice = prices |> Seq.nth 0
    let startPrice = prices |> Seq.nth (days - 1)
    lastPrice / startPrice - 1.

I am getting an error at the static.

GetStockPrices.fs(31,6): error FS0010: Unexpected keyword 'static' in binding. Expected incomplete structured construct at or before this point or other token.
Does anyone know if they have changed the syntax or can spot what I am doing wrong

© Stack Overflow or respective owner

Related posts about F#