http://t3x.org/klong/ambiguity.html

Klong is Unambiguous

Array languages typically introduce a lot of ambiguity, which is intended, because it is common in mathematics and allows to recycle symbols and names for different purposes. It is also something that I have always disliked about math. Hence I invented Klong.

For instance, in K the expression f/x may denote any of the following, depending on the type of f:

Similarly, x f/y may denote:

Im Klong, there is a unique adverb for each of those operations:

f/x   fold f over x
f:~x   converge toward the fixpoint of f(x)
x f/y   fold f over x,y
x f:~y   set y::f(y) while x(y)
x f:*y   set y::f(y) x times

The Converge and While adverbs are distingished by their context: f:~ in a prefix position means Converge and in an infix position it means While.

Similarly, Klong distinguishes between Drop (_) and Cut (:_), Modulo (!) and Rotate (:+), and Take (#) and Reshape (:^).

And, yes, some Klong operators look like smileys. :)


contact  |  privacy