function sum(a, b, c) {
    return a + b + c;
}

// Curried version of the sum function
function curriedSum(a) {
    return function(b) {
        return function(c) {
            return a + b + c;
        };
    };
}

// Using the curried function
console.log(curriedSum(1)(2)(3)); // Outputs: 6


// Another practial example
function log(date) {
    return function(importance) {
        return function(message) {
            console.log(`[${date.getHours()}:${date.getMinutes()}] [${importance}] ${message}`);
        };
    };
}

const logNow = log(new Date());
const logInfoNow = logNow("INFO");
logInfoNow("This is an informational message.");