I'm trying to create a function that takes in a variable amount of parameters but I can't seem to find any viable solution for F#.
let expression = (fun a b -> a || b)
let expressionTriple = (fun a b c -> (a || b) && c)
// This doesn't work because expression can either be a function that takes fixed arguments
let truthTable numPredicates expression =
if numPredicates = 2 then
expression true true
else
expression true true false
truthTable 2 expression
truthTable 3 expressionTriple
How can I pass in a variable amount of arguments into the expression function?