Can you explain what this line of code means?

Can you explain what this line of code means?
Why can it be written like this?
Why should it be written like this?

    fun log(tag: String)
        = fun(target: OutputStream)
        = fun(message: Any?)
            = target.write("[$tag] $message\n".toByteArray())

since you labeled this question currying , I wonder why you don't know that this is the general Corey way of writing.

The

log function takes a tag parameter and returns an anonymous function that receives the target parameter, which in turn returns an anonymous function that receives message . Finally, this function uses the three parameters received earlier to complete the write operation.

this function needs to be tuned when called, like this:

log(aTag)(aTarget)(aMessage);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e7dae0-975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e7dae0-975.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?