Tech News
← Back to articles

Klong: A Simple Array Language

read original related products more articles

Klong

A Simple Array Language

The Klong Book

Documentation | Download

Klong is an array language, like K, but without the ambiguity. If you know K or APL, you may be disappointed by Klong. If you don't know any array languages, it might explode your brain. Use at your own risk!

Programming in Klong

A Klong program is a set of functions that use various pre-defined operators to manipulate lists (vectors) and (multi-dimensional) arrays. Here is a program that checks whether a number x is prime (for x>2):

{&/x!:\2+!_x^1%2}

Note that Klong is a mathematical notation rather than a programming language. If you try to use it like your favorite functional/procedural/OO programming language, you will only get frustrated. Here's an explanation of the above program.

Learn More About Klong

... continue reading