SOAPCAL

From Esolang
Jump to navigation Jump to search

The idea of this programing language is to be a functional paradigm which uses emojis. Also this was made by User: A().

Syntax Rules

  • Numbers are lambda expressions meaning you can apply a number to itself ( Same with bools )
  • Every line must have  ? preceding it
  • Strings are functions that return themselves

Syntax For Functions

? ( a ‪‪❤︎‬ [ b ] ) b gets feed into a
? ( a ⤷ [ a1, b1, c1 ] . n ) a is a function that has variables a, b, and c 

Deduction rules

1. You must always unwrap the function first 2. The nth variable gets replaced by the nth input and then gets put on an input queue, also the name of the variable gets kept in a separate queue 2.1. If that variable is nowhere found in the return part of the function, it gets deleted. 2.2. If that variable is found in the return part of the function, the input replaces the variable.

Commands

Built In Commands
Cmd Effect
( ☻ ‪‪❤︎‬ [ a, b ] ) if a and b are true, return true
( ツ ‪‪❤︎‬ [ a, b ] ) if a or b are true, return true
( 𖦹 ‪‪❤︎‬ [ a ] ) not a
( a ⤷ { b, c } ) boxes, useful for storing lists of information
empty value; does nothing

Programs

Hello World!

? ( H ⤷ [ a ] . "Hello World!" ) # sets H to a function that returns "Hello World!"
? ( H ‪‪❤︎‬ [ a ] )

Succession

? ( succ ⤷ [ n, f, x ] . ( n ‪‪❤︎‬ [ f, x ] ) )
? ( succ ‪‪❤︎‬ [ 1 ] )

Addition

? ( succ ⤷ [ n, f, x ] . ( n ‪‪❤︎‬ [ f, x ] ) )
? ( add ⤷ [ a, b ] . ( a ‪‪❤︎‬ [ ( succ ‪‪❤︎‬ [ b ] ) ] ) )
? ( add ‪‪❤︎‬ [ 2, 3 ] )

Multiply

? ( succ ⤷ [ n, f, x ] . ( n ‪‪❤︎‬ [ f, x ] ) )
? ( add ⤷ [ a, b ] . ( a ‪‪❤︎‬ [ ( succ ‪‪❤︎‬ [ b ] ) ] ) )

 ? ( multiply ⤷ [ m, n ] . ( m ‪‪❤︎‬ [ ( add ‪‪❤︎‬ [ n, ∅ ] ) ] ) )

? ( multiply ‪‪❤︎‬ [ 2, 3 ] )