Trying to do Type-Driven Development in F# I've been wanting to try out F# for some real world programming so I decided to try rewriting a program that is being used at work.

It can be reduced to a few steps:


Get report templates.
In this step I query a DB and get some templates for reports
Update data that the reports are working on.
In this step I query some banking services and save our data on our DB
Generate new reports.
In this step I call a stored procedure that generates a new report


I'm trying to do this outside in and have been using Mark Seemann's blog and Scott Wlaschin's guide as a guide and this is what I've got so far:

module Helpers =
let getValuesInListOfOptions list =
    List.choose (fun x -&gt; 
                    match x with
                    | Some value -&gt; Some value
                    | _ -&gt; None ) list
module PaymentVelocityReports =
open System;
open Helpers;

type ReportTemplateName = string

type ReportTemplate = { 
    Id: int
    GroupId: int
    ReportOwnerSSN: string
    Name: ReportTemplateName
    Description: string
    Enabled: bool
    DayOfMonthToRun: int
    DateFrom: DateTime
    DateTo: DateTime option
    UpdateData: bool}

type Claimant = {
    Id: decimal
    Ssn: string
}

type BankingService = {
    Id: decimal
    ClaimantId: decimal
    Bank: string
    Username: string
    Password: string
    Enabled: bool
}

type ClaimantTemplates ={
    ReportTemplates: ReportTemplate list
    Claimant: Claimant
    BankingServices: BankingService list
}


let updateClaimantData saveNewGiros saveNewPayments (dateFrom: DateTime) (dateTo: DateTime) (bankingServices: BankingService list) = 
    List.iter (fun x -&gt; saveNewGiros dateFrom dateTo x) bankingServices
    List.iter (fun x -&gt; saveNewPayments dateFrom dateTo x) bankingServices

let updateData updateClaimantData (claimantTemplates: ClaimantTemplates) : ReportTemplateName list =
    if List.exists (fun x -&gt; x.UpdateData) claimantTemplates.ReportTemplates then
        let minDate = List.map (fun x -&gt; x.DateFrom) claimantTemplates.ReportTemplates |&gt; List.min
        let maxDateWithNone = List.map (fun x -&gt; x.DateTo) claimantTemplates.ReportTemplates |&gt; List.max
        let maxDateWithoutNone = List.map (fun x -&gt; x.DateTo) claimantTemplates.ReportTemplates |&gt; getValuesInListOfOptions |&gt; List.max

        match maxDateWithNone with
            | None -&gt; updateClaimantData minDate DateTime.Today claimantTemplates.BankingServices
            | _ -&gt; updateClaimantData minDate maxDateWithoutNone claimantTemplates.BankingServices

    List.map (fun x -&gt; x.Name) claimantTemplates.ReportTemplates

let getClaimantTemplates data createClaimantTemplate : ClaimantTemplates list = 
    data |&gt; List.map createClaimantTemplate

//The root of the program
let generateReports (getClaimantTemplates: unit -&gt; ClaimantTemplates list) (updateData: ClaimantTemplates -&gt; ReportTemplateName list) (createReport: ReportTemplateName -&gt; unit) =
    getClaimantTemplates () |&gt; List.map updateData |&gt; List.concat |&gt; List.map createReport |&gt; ignore


I'm at the point where the updateClaimantData and getClaimantTemplates require data access and the createReport function that generateReports needs is also a data access function.

I was hoping to get some criticism to see if I'm on the right track. I'm both new to the language and functional languages as well.
From a cursory glance, this looks like a good start, but I haven't made a full exegesis of the code.

A couple of observations:

The getValuesInListOfOptions function seems redundant. AFAICT, you can rewrite the function as List.choose id list, in which case you could inline that expression and remove the function.

It seems odd to me that the function with the comment The root of the program is still a higher-order function defined in the same module as all the other functions. I'd expect the root of the program to be something akin to a main function, that only takes command-line string arguments as input, if it takes any arguments at all.