Kind n' Single

From Esolang
Jump to navigation Jump to search

Kind n' Single is an esolang created by User:Yayimhere based on Category theory

System

you can define a variable. it can be recursively defined(like how main(){main();} is valid in C). there are two operators that takes a single argument and a single one that takes two arguments. all morphisms are directional:

\x returns a category that represent a monad of x where the triplet elements are an empty object(or null), x itself(so that category becomes nested within the monad), and the identity function.
+x y returns a category that has all the elements of x and y, however not the categories themselves(however morphisms are not discarded between objects, and if two objects have the same name, one from x and one from y, they are merged together with all morphisms that each had applying to this new merged object, however the new object does not have any compositions with itself or others) and a object that has a one way morphism TO all elements in the category FROM it. this object is unique by the fact it has no label(and cannot be labeled).
~x(y) add and object named y to the category x, that has morphisms FROM every object TO it.

there are these constants:

v is a category with two elements(the identity function and null) that both morphism to each other(bidirectional, and specifically, the simplest one possible, WITHOUT identity morphisms)
o empty category

to define a variable x set to any Kind n' single program y. this program is not evaluated before x is referenced:

x = y

and this is a comment:

/* comment */

for the definitions of each object ive mentioned:

  • identity function: λx.x in lambda calculus
  • null: a null register.
  • a category: a category following actual category-theoretic rules, however we do not check if there is one identity per object. identity morphisms are NOT autogenerated.
  • morphisms to/from every object to/from a specific object: this includes an identity morphism to itself. no compositions through it exist.

errors:

  • if an operator is not provided with all the arguments it requires, give error inadequate number of inputs