functionaI

From Esolang
Jump to navigation Jump to search
Not to be confused with Functional.
FunctionaI
Paradigm(s) Functional
Designed by User:kiken
Appeared in 2023
Computational class Turing complete
Reference implementation Unimplemented
File extension(s) .functionai, .functlon

functional (with a capital I) is an esolang made by kiken that uses nameless functions. The capital i may look like a lowercase L in sans-serif fonts.

Syntax and overview

functionaI has an unbounded tape and uses nameless functions which are identified by their argument count. Other characters other than ( or ) are ignored.

Basics

A function without arguments returns 0:

() # Returns '0'

This returns 1:

(()()()()()()())

because 0 ^ 0 ^ 0 ^ 0 ^ 0 ^ 0 ^ 0 is 1.

Functions

Argument count Function
0 Returns 0
1 Sets the cell pointer to the first argument.
2 For no other reason other than to be able to make a quine, print (()()).
3 While the first argument ≠ second argument, execute the third.
4 Move the pointer left by the first argument, then second, third and fourth args.
5 Move the pointer right by first arg, second, third, fourth and fifth.
6 Returns the cell at the pointer. Ignores all arguments (for some reason.)
7 Returns first arg ^ second ^ third ^ fourth ^ fifth ^ sixth ^ seventh.
8 Get user input as a char. Ignores all args (again).
9 Print all args as a char.
10 Returns first arg + second + third + fourth + fifth + sixth + seventh + eighth + ninth + tenth
11 Returns first arg - second - third - . . . - tenth - eleventh

Grouping

Code can be inserted as a single argument by using [ and ], like this:

[ code ]

Examples

Cat program

(
  ()(()()()()()()())
  [(
    (()()()()()()()())
    ()()()()()()()()
  ])
)

Quine

(()())

Hello, world! (actually just prints 'H')

(
  ((
    (
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      ()()
    )
    (
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      (()()()()()()())
      ()()
    )
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
  ))
  ((
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()()())
    (()()()()()())()
  ))
  (
    (()()()()()()()())
    ()()()()()()()()
  )
)

Proper hello, world!

(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()[((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()()())()()())(((()()()()()())(()()()()()()())()()()()()()()))])((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()[((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()()())()()())(((()()()()()())(()()()()()()())()()()()()()()))])((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()[((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()()())()()())(((()()()()()())(()()()()()()())()()()()()()()))])((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))((()()()()()())()()()()()()()())((()()()()()()())()()())((()()()()()()())()()())((()()()()()()())()()())((()()()()()()())()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())((()()()()()()())()()()())((()()()()()()())()()()())((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))((()()()()()())()()()()()()()())(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))(((()()()()()())(()()()()()()())()()()()()()()))((()()()()()())()()()()()()()())((()()()()()()())()()()())((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))((()()()()()())()()()()()()()())

99 bottles of beer

Too big to display here. Execute this Python 3 script instead:

print("""+>+++++++[>>>+++
                 +++++<<<<+++++
               +++>-]+++++++++>>>
                +>>++++++++++[>+
                 +++++++++<-]>[
                 >>+>+>+>+>+>+>
                 +>>+>+>>+>+>+>
                 +>>+>+>>+>+>+>
                 >+>+>+>+>>>>>+
                 >+>+>+>>+>+>+>
                 >+>+>+>+>>+>+>
                +>>+>+>+>+>>+>+>
                >+>+>+>+>+>+>>>>
                +>+>>+>+>+>+<<<<
                <<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               <<<<<<<<<<<<<<<<<<
               -]<++++[>++++++++<
               -]>[>+>>>>>>>>+>>>
               +>>>>>+>>>+>>>>+>>
              >>>+>+>>+>>>>>+>>>>+
              >>>>>+>>>>+>>>>>+>>>
              +>>>>>>>+>+>+>>>+>>>
              >>+<<<<<<<<<<<<<<<<<
              <<<<<<<<<<<<<<<<<<<<
             <<<<<<<<<<<<<<<<<<<<<<
            <<<<<<<<<<<<<<<<-]+++++[
           >>>++>+++>+++>++>>+++>>++>
          >>>>>+++>>++>++>>+++>+>>>+++
        +>->++>++>++>+++>++>>--->->+>>>+
       +>++>>>>++>++++>++>>->++>>>++>->++
     +>+++>>+>+++>>>+++>++>+++>++>>>++>>++>
    ++>>++>++>+++<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<<<<<<<<<<<<<-]>[<<.>>
>>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>
.>.>.>.>.>.>>>.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<.>>>>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>>>>>>>>>>
>>>>.>.>>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<-.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>>.>..<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<->]<<]<.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>>>.<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<.>>>>.>.>.>.>.>.>.>>.>.>.>.>.>.
>.>.>>>>>>>>>>>>>>.>.>>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
>.>.>.>.>.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<.>.>.>.>.>.>.
 >.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>>.>""".replace("+","(((()()()()()())(()()()()()()())()()()()()()))").replace("-","(((()()()()()())(()()()()()()())()()()()()()()))").replace("<","((()()()()()()())()()())").replace(">","((()()()()()()())()()()())").replace("[","((()()()()()())()[").replace("]","])").replace(".","((()()()()()())()()()()()()()())").strip(" ").strip("\n").strip("\r").strip("\t"))

Truth machine

((()()()()()()())()()()())((()()()()()()())()()()())((()()()()()()())()()()())((()()()()()()))((()()()()()())()()()()()()()())((()()()()()())()[((()()()()()())()[(((()()()()()())(()()()()()()())()()()()()()()))((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()))((()()()()()()())()()())((()()()()()()())()()())(((()()()()()())(()()()()()()())()()()()()()))((()()()()()()())()()()())])((()()()()()()())()()()())(((()()()()()())(()()()()()()())()()()()()()()))])((()()()()()()())()()())((()()()()()()())()()())((()()()()()()())()()())((()()()()()())()[((()()()()()()())()()())((()()()()()()())()()())])((()()()()()()())()()()())((()()()()()())()[((()()()()()())()()()()()()()())])

Computational class

kiken believes that functionaI is turing-complete. The proof can be shown from a direct translation to brainfuck:

functionaI brainfuck
(((()()()()()())(()()()()()()())()()()()()())) +
(((()()()()()())(()()()()()()())()()()()()()())) -
((()()()()()()())()()()) <
((()()()()()()())()()()()) >
((()()()()()())()[ [
]) ]

I/O translation:

functionaI brainfuck
((()()()()()())()()()()()()()()) .
((()()()()()())) ,

Implementations

Currently unimplemented.