!Tautologos

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.

!Tautologos is a derivative of Tautologos, combined with Table, all of which are specified by User:Rdococ. The exclamation mark at the beginning represents a logical inversion.

What's it about?

!Tautologos has two types, compared to Tautologos' solemn swear to only have one. There are functions, and tables. You can do many things with them.

if = {}
if[true] = function (trueValue, falseValue) return trueValue end
if[false] = function (trueValue, falseValue) return falseValue end

Oh! I almost forgot to define true and false!

true = function () return true end
false = (function () return end)()

Like in Tautologos, you can abbreviate function definitions.

if[true](trueValue, falseValue) = trueValue
if[false](trueValue, falseValue) = falseValue

But unlike Tautologos, you can't sneak in two parameters of the same name to redefine the function where the two parameters are equal.

equals(x, x) = true -- Nope. Doesn't work the same way it did in the original.

This was actually inspired by Bulan, another esolang of User:Rdococ's which was basically Lua without conditionals or loops. However, this one has no local variables. Other than parameters. Or maths. Lesser than or greater than don't work either. Define it yourself.

equals = function (x) return {[x] = true} end -- functionally equivalent to equals(x) = {[x] = true}