Nested one input functions

From Esolang
Jump to navigation Jump to search

Nested one input functions is a programming language that uses one input functions

Functions

a:
  b:
    ^b b
<hi<hello
!this returns hi hello
!the functions are defined by their inputs, ^ is the previous input function, 
!the ^b refers to the a in the upper function, < runs the previous function
!with this input, the <hi inputs hi into a and results in:
!b:
!  hi b
!then the <hello inputs hello into this resulting function and it results in hi hello
!! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in !! makes a comment, in 
!, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a comment, it makes a commentv

Examples

Mockingbird

a:
  a a

Identity

a:
  a

Constant

a:
  b:
    ^b

Opposite of Constant

a:
  b:
    b

One more thing

!since this is invalid
a:
  b:
    a
!you can do this
a:
  a:
    ^a
!this is the true function
!or this
a:
  a:
    a
!this is the false function