Func()
- The title of this article is not correct because of technical limitations. The correct title is actually Func[].
Func[] is a esolang inspired by lambda calculus. Idk. Oh also User:Yayimhere made it
syntax
Func[] has a single thing it can do:
F[x y]
This creates a function f that takes input as x and will output y. So if we pass f the letter r:
F.r /yes this is passing a input
It would result in y. Yea. Func[] allows for recursive functions. It also can do this:
F[x >]
This copies the latest letter put in code to that position. So this returns the input. This can be used to do whats called combining:
F[x >< y >]
This will combine x and y and move the result to the output. Combining will take the left char thats being combined and duplicate it and then add y to the start of that string, so the result here is xxy
. To make a function output the result:
F[x x]$
Yea you just add the money sign to the end. There is one conditional:
F[x ? y >]
This combines x and y and checks if results from the combination is 3 instances of x or the left input. If it is it will make the output be the function passed to itself(so it become recursive). Else it just returns x. The functions cant have more than one input. To combine 3 function(with the same input) into a single function. The name of the function if not needed. The result will be all the results added together:
[x y]⎫ [x x]⎬F [x y]⎭
This puts all the function into F. To get the letter from the function above ^
is used. There is no downward version of this cuz. Well idk. Oh also i
will be replaced by user input and *
will swap whats on the left and right of it and dissappear. Everything is evaluated left to right
is this usefull
I dont think so but who knows. But i dont know what to make of it
examples
Truthmachine[x ? 1 >]$ F.i
This outputs:
F[F[F[…]$ ? 1 >]$ /If the input is 1. Else it will output 0
Triangle:
[x F >]⎫ [x >< F >]⎬F [x >*F*. >]⎭ F.r
This will create a triangle with 3 layers. Each one will be infinite but the first row will be ∞
The second row will be ∞+1
And the last ∞^2+1
I think
polyglot(with this and bf):
,[. >< ,]
In func[] this basically works as a unary multiply by 2 and increment by 1 if we treat both the .
And the ,
As one number. And in brainfuck this sets the cell to user input does some non usefull commands(><
) and is a Cat