Given the following code:
namespace Backend
open System
open System.Linq
open Npgsql
module helpers =
let rec second_elms lst =
match lst with
| [] -> []
| (d,o)::xs -> o::(second_elms xs)
let folder acc elm =
let result_list,acc_to_substract = acc
result_list::(elm-acc_to_substract),elm
type ChartManager() =
static member ConvertOutputNumbersToDifferenceSegments(listOfOutputValuesForADay: list<DateTime*int>) =
let secs = helpers.second_elms listOfOutputValuesForADay
let trans = List.fold
helpers.folder
([],snd(secs.First()))
secs.Tail
let sndDateTime = fst(listOfOutputValuesForADay.ElementAt(1))
for each_output in fst(trans) do
yield (sndDateTime,each_output)
It's giving me lots of errors, but I guess the majority are just cascading errors from the main one in the "trans" block, which says (highlighting the word helpers):
Unexpected identifier in binding. Expected incomplete structured construct at or before this point or other token.
What does this mean??