Post AzPDDIMr9pfwtJAAzI by loke@functional.cafe
 (DIR) More posts by loke@functional.cafe
 (DIR) Post #AzPDDIMr9pfwtJAAzI by loke@functional.cafe
       2025-10-20T16:13:04Z
       
       1 likes, 0 repeats
       
       So, the Kap language have received a new feature: modified assignment.It's similar to how in C you have the operator += which adds a value to a variable. In other words, a += b is equal to a = a + b.Kap now supports the same, but it's made generic such that any dyadic function call is allowed. So, a F← b is equal to a ← a F b.Since inline functions are as simple as writing some code enclosed in { and }, you can even do things like: a {⍺+⍵+5}← 2 if you should so wish.This is not a new idea, and credit goes to Dyalog which has had this functionality for a long time. It turned out that implementing it in Kap was very easy, since the necessary infrastructure was already in place.