Only the first function need be reusable
I'd say this for the following reasons:
Disadvantage to functional languages
Suppose that there is a challenge to print two numbers, and I submitted the following code in F#:
let f x y =
printfn "x: %i y: %i" x y
F# would implicitly curry this, so to comply it would have to be re-written into something like:
let g y =
printfn "y: %i" y
let f x =
printf "x: %i " x
g
Which is a disadvantage to F# (and I'm assuming other functional languages!)
It's the submitted function itself that's important
Martin Ender said this too in his comment.
When I look at a submission like:
let f x y =
printfn "x: %i y: %i" x y
I'm more looking at if this block of code is reusable, rather than the individual functions curried in this code. I would expect that the code function be reusable, but not every function implicitly defined in it. The actual submission is what's important.
It's not a very interesting rule
The rules are (mainly) there to keep challenges open and interesting. It means that I can't hard-code a solution to a puzzle, because that would make things too easy and dull.
With this restriction I cannot see how it would make things more interesting. To me it would be a superfluous rule that's just there to be followed, and doesn't add anything to the site.
f
needs to be reusable. I wouldn't necessarily expectg = f(1); g(4); g(5)
to be valid, justf(1)(4); f(1)(5)
, sincef
is the actual submission. That said, an argument for requiring intermediate functions to be reusable could certainly be made, but I wouldn't say it's clear from rules we already have. I think this is a good question. \$\endgroup\$t=f(4);t(5)
support is necessary \$\endgroup\$