The new F# programming language allows you to write curried functions. I am not a fan of using curried functions, at least from my point of view as a software tester. By the way, the term "curried" comes from Haskell Curry, a mathematician. Consider this normal F# code:
printfn "\nBegin curried function demo\n"
let s1 = "Hello"
let s2 = "world"
let s1 = "Hello"
let s2 = "world"
let prependString p s =
let result = p + s
result
let result = p + s
result
let r1 = prependString "//" s1
let r2 = prependString "//" s2
printfn "r1 and r2 are %s %s \n" r1 r2
let r2 = prependString "//" s2
printfn "r1 and r2 are %s %s \n" r1 r2
The result would be, as you’d expect "r1 and r2 are //Hello //World". Now here’s a way to use curried functions:
let curriedPrependSlashes =
prependString "//"
prependString "//"
let r3 = curriedPrependSlashes s1
let r4 = curriedPrependSlashes s2
printfn "r3 and r4 are %s %s \n" r3 r4
let r4 = curriedPrependSlashes s2
printfn "r3 and r4 are %s %s \n" r3 r4
The result would be identical, "r3 and r4 are //Hello //World". From a usage point of view curried functions allow you to reduce the number of arguments passed to a function when the function is called. I don’t like this from a testing point of view because currying usually involves an extra call to a non-curried helper function, which makes testing a bit more opaque so to speak. In other words, the call:
let r1 = prependString "//" s1
is more clear to me as a tester than the call:
let r3 = curriedPrependSlashes s1
But, this is really more opinion than technical and some people whose opinions I respect think curried functions are great things.
.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference