Talk:Th

Computational class
Since you added the tag "Unknown computational class", I propose the addition of control-flow instructions. Since the language as it stands now lacks these, it is definitely not turing-complete. An if-then-else instruction would be nice but due to the two-element atom restriction, only an if-then instruction would possible. Therefore, to make an if-then-else possible, I suggest  which returns a new type (the couple) of   and. You might want to add syntactic sugar for  in the form of   -- that is, without a function name.

Then, I suggest the instruction  where   is something that will be evaluated to true or false, all numbers being true except 0, all strings being true except the empty string, nil being always false and a couple evaluating to true if both its items are true, and false otherwise. is the couple that will be chosen from based on : if   is true, it returns the first element of , else it returns the second. Also, a  instruction, returning the boolean NAND of the arguments casted to booleans), would be needed since then boolean logic can be performed (NAND logic).

Then, an if-then-else expression can be written:, or with syntactic sugar,.

Then, to enable looping to make this a turing-complete language, I suggest adding the instruction, which evaluates   an infinite number of times, checking before each execution whether   is still true and stopping the loop otherwise. It might return.

Furthermore (I keep going on, sorry!), I would suggest specifying what all the functions return. I specified it for the ones I introduced here, and I propose that  returns   and   returns the value of its right argument. ,,  ,   and   are clear already.

I believe with these additions, one might be able to convert an arbitrary BF program to Th code, making it turing-complete. T.J.S.1 (talk) 08:37, 12 June 2014 (UTC)