icon heya, i'm mirvox.

I develop languages and applications for a better future.

experience projects papers github email cv
all projects

Teto Array Language

An APL Inspired programming language with a prefix syntax and symbols that fit on your keyboard. Teto has support for Doubles, Arrays, Booleans and Chars.

The Teto online playground evaluating "> + * 2 |23" to 552.0

About

Teto is an APL-inspired array programming language with a prefix syntax and symbols that fit on a regular keyboard. It supports doubles, arrays and chars (a string is just an array of characters), and it can be tried online in the Teto playground.

Reading Teto

> + * 2 |23
=> 552.0

In infix form, this reads as foldl (+) 0 (map (*2) [1..23]): build the range from 1 to 23, double every element and fold the result with addition.

Arrays first

Operators work directly with arrays, and the order of the operands matters: a number times an array maps over the array, while an array times a number repeats it.

* 3 [1,2,3]
[3.0, 6.0, 9.0]

* [1,2,3] 3
[[1.0, 2.0, 3.0], [1.0, 2.0, 3.0], [1.0, 2.0, 3.0]]

Built-in functions

  • | range, as in |5 for [1.0, 2.0, 3.0, 4.0, 5.0]
  • ¢ maximum and _ minimum of a list
  • ! factorial, ¬ negate, ^ exponent and ° identity
  • § reverse, @ rotate, # index, & match and ' flatten

Teto is a hobby project made for fun, implemented in Haskell and released under the BSD-3-Clause license.