Perm

From Esolang
Jump to: navigation, search
This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.

Perm is a language built around permutations. For the moment, it is undecided whether this should be procedural or functional.

This is a work in progress, and any help on filling in the blanks would be appreciated.

Specification

Basics

  • Any decimal integer, n, computes the transposition (0 n)
    • Therefore 0 is the identity permutation
  • The . operator computes the product of the two operands
  • ~ is the end-of-line comment delimiter
1.2.3     ~computes (0 1)*(0 2)*(0 3), or (0 1 2 3)
  • The unary - computes the inverse of a permutation
    • This means 1 == -1
  • Parentheses can be used to group operations
-(1.2)    ~computes the inverse of (0 1 2), or (0 2 1)

Functions and Flow Control

TODO

I/O

TODO