Photography
Photography is an esoteric programming language created by User:Yayimhere, based on what she calls "an abuse of what they hallucinate as Haskell". As well as that, it's also based on N-Type, and was created as a (Completely unrelated seemingly) successor to that language. Its main data type are pairs, and its main type of operator are prefixes and infixes. It technically also has an arrow, like N-Type, but they dont seem related.
Commands
application is written:
F(x,y,z,...)
However the following is valid as the same thing, giving currying(So a function can bee given less inputs that it use):
F(x)(y)(z)(...)
The main operator is:
[{F,x} -> y]
where F is an arity 2 or more function. This creates an infix operator a [{F,x} -> y] b, which evaluates to F(b(a(x)),y). Next comes:
{a,b}
this is a pair. When applied as a function to a value x, it returns x(a,b). {F} = {F,_}. Next there is:
F(_,x,y,z,...) = F(x,y,z,...) F(_) = F
as you see this is the _ element, and when passed to a function, it is simply ignored. Next are the five prefixes:
`f +f -f ^f *x
`f, where f is an infix operator, returns a function (`f)(x,y) = y f x. If we say + was infix, it would be (`+)(x,y) = x + y.
+f & -f apply to any function. If f(x,y,z) = ..., (+f)(x,y,z,...,k) = f(x,y,z)(k), and (-f)(k,x,y,z,...) = f(x,y,z)(k). As you can see, both of these prefixes increase the arity by precisely one.
The last prefix applies to another prefix, and is defined as (^f)(x) = fx. So, like (^+)(x) = +x.
And last if *x, which acts upon any element. f(*x) = x, and *x(y) = x(y).
Next comes [1] & [2]. Both take on input. The first one returns a function that ignores its input, and returns the original input of [1]. So, for example, [1](x,y) = x(since currying, [1](x,y) = [1](x)(y)). Similarly, [2](x,y) = y. In other words, [2] takes one input, and returns ø. ø is simply the identity function.
Next comes =(f,x). If f(x) = x, it returns x, however if f(x) ≠ x, then it returns *x.
a+b, where a have arity n, and b has arity m, returns a function with arity k (=m*n), where first, a is applied to the first n inputs, then the second, and so on until the m'th n inputs, for which all of these are passed to b.
[F], where F has an arity of 2, returns an infix operator, where a [F] b = F(a,b), which yes, does mean {F,x} -> y is a non infix operator.
a : b is an infix operator that sets the variable a to the expression b, and also returns those variables.
(...) is a closed body lambda with a single input, where that input substitutes into the place of every % symbol.
Prefixes are always evaluated first, then infixes, and then function applications, however the inputs of all these, are evaluated before that, which means Photography uses eager evaluation, and left to right. Note that brackets also exist(as has been shown in this article). If an expression is on its own line, it simply gets removed once evaluation of it is done, going up to down.
Example functions
Apply second input to first(swap):
swap : (-ø)
Logical not between [1] & [2](not):
not : {[2],[1]}
copy value (cop):
cop : (%(%))
Examples
([i](ø,(%(%))))((%(%)))
replace i with input, incremented by 1.