0
votes

This code is giving error FS0001: This expression was expected to have type 'string' but here has type ''a * 'b'

open System 
open System.Linq

let list1 = [ "one"; "two"; "three" ]
let list2 = [ "one"; "two"; "three" ]

let tablesValidation (l1 : string list) (l2 : string list) =
    printfn "%O" l1
    printfn "%O" l2


tablesValidation(list1,list2)
Console.ReadKey() |> ignore
1

1 Answers

1
votes

In F#, function arguments do not need parentheses and are separated by spaces. Change it to this:

tablesValidation list1 list2

Your original version passed a tuple value as a single parameter, hence the error message, where a * b means a tuple with two fields.