logoalt Hacker News

joomytoday at 12:00 AM1 replyview on HN

"fark" here takes two arguments, the first (the minuend) is in instrumental case (-le), the second (the subtrahend) is in genitive case (-in). Now, because of the suffixes of the cases, regardless of the order in which you give the arguments, the type system can figure out which one is supposed to be the minuend and which the subtrahend.

If it helps, you can think of it like named arguments where the name is inferred from the case.


Replies

ronjakoitoday at 2:11 AM

Essentially you could write equivalent code as (vähennä 5:ttä 3:lla) in Finnish