Arrow (language)
Jump to navigation
Jump to search
Arrow is a language that appearently has its name already used so i added "(language)" but heres how it works:
Rules
The only thing that is in this language is arrows (->) (and of course parenthesis for ambiguity) the syntax arrows can be is this: A->B or -> but you cant do: A->B->C
The twist
Arrows are literally the only thing you can do, you cant do like apple->banana the way to reperesent things is using arrows, for example, the simplest object is (->), and a more complex object is (->)->(->), because yes, you can put arrows between arrows
Computation
You might think "oh where are the rules to do stuff", or "but there is literally no transformations or anything", but, you can do stuff though:
Types of arrows
There are types of arrows: a-> d-> t-> -> these are the four (right now) types of arrows, a-> is apply, d-> is define, t-> is delay, and -> is normal no compute arrow
How they work
(A)a->(B) applies A to B, as if it was B(A), with rules specified after this line (A)d->(B) defines a transformation, which replaces A with B, which is what apply does, it takes the thing, replaces A in it, and replaces it with B, so for example (apple)a->((a)d->(b)), turns into (bpple), but this is just an example, lets see real also t->(A) delays execution in A until it gets replaced so, (X)a->(Xd->(t->(abc))) -> abc
Examples
3: ((((->)->((->)->(->))->(->))->(->))->(->) this is a 3, because it has 6 (->), where number is amount of (->) minus 3 which is defined based on (x-1)->(->), youl see why there is ((->)->((->)->(->)) add: Aa->(((->)->((->)->(->))d->B) this adds two numbers
Special parts
For example, ((->)->((->)->(->)) is a special part, it is used for no representation, but it is used for a part to select using a->
Might be turing complete
I have been testing for loops and stuff and it might be possible