// TODO: The relation -> operator (and => for functions) is defined using the language. How?

  // TODO: How to make infix possible (without adding new language features):
  @a => (("|" -> @b) -> ..)// Native

  // SOLUTION?:
  // Define infix relations with ( 
  "(" -> 
    @a => "|" -> @b => ")" -> .. /* Natve */

  (someSet | otherSet)

  // PROBLEM: Parentheses were used to disambiguate
  // SOLUTION: Define catch-all defintion
  "(" -> @a => ")" -> a

  // If there are multiple relations (or functions?) with the same input, and both have function as output that have
  // inputs, those function will become one in scope.
  // Above two relations become:
  // ERROR: One more step needed
  "(" -> {
    ...@a => "|" -> @b => ")" -> .. /* Natve */,
    ...@a => ")" -> a
  },

  // If the function has overlapping inputs, and the function return a relation/function, the functions are combined:

  "(" -> @a => {
    "|" -> @b => ")" -> .. /* Natve */,
    ")" -> a
  },

  ")" -> ")",
  "|" -> "|"

  ( 20 // With the current scope, either `)` or `|` can be passed

  // Set builder
  {|@a : Int => a <= 10|}

  // If function input have the exact same specificity,

  // If there are 2 relations with the same input in scope, that's an error.
  "abc" -> 10
  "abc" -> 12
  abc // Result: ??

  // Define relation syntax through the language itself:
  // It is defined, but not using the language's syntax.
  // Should be displayed in pseudo-syntax when hovering over `=>` or `->`
  @a => "->" -> @b

  "(" ->
    @a => _tupleOf a

  "_tupleOf" ->
    @a -> {
      ")" -> a
      "," -> @b => _tupleOf {{a}, {a, b}}
    }

  $ "(" 
  $ "(" 10                // Result: _tupleValue 10
  $ "(" 10 ","            // Result: _tupleValue 10 ","
  $ "(" 10 "," 20         // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}})
  $ "(" 10 "," 20 ")"     // Result: {{10}, {10, 20}}
  $ "(" 10 "," 20 ","     // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}} ",")
  $ "(" 10 "," 20 "," 30  // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}} "," (_tupleValue {{{{10}, {10, 20}}}, {{{10}, {10, 20}}, 30}}))
  $ "(" 10 "," 20 "," 30 ")"
  // Or:
  (10, 20, 30)

  $ "(" 10 ")" // 10
  (10) // 10

  [a, b]
  {{a}, {a, b}}

  [a, b, c]
  {{a}, {a, b}, {a, b, c}}

  // MAYBE: The only character that is pre-defined is:
  ∅
  // To denote the empty set.
  // If used with this symbol, the empty set is actually a relation that accepts argument that can be "put in" in the set
  ∅ ∅ // { {} }
  
  ∅ ∅ ∅ // { { {} } }

  "{" ->
    @a => _setOf a

  "_setOf" ->
    @a -> {
      "}" -> // ?? SETOF a
      "," -> @b => _setOf {a, b}
    }

  $ "(" 
  $ "(" 10                // Result: _tupleValue 10
  $ "(" 10 ","            // Result: _tupleValue 10 ","
  $ "(" 10 "," 20         // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}})
  $ "(" 10 "," 20 ")"     // Result: {{10}, {10, 20}}
  $ "(" 10 "," 20 ","     // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}} ",")
  $ "(" 10 "," 20 "," 30  // Result: _tupleValue 10 "," (_tupleValue {{10}, {10, 20}} "," (_tupleValue {{{{10}, {10, 20}}}, {{{10}, {10, 20}}, 30}}))
  $ "(" 10 "," 20 "," 30 ")"

  "@" -> 

  // END MAYBE

  "format" -> {
    @x -> {
      EOT -> toString x,
      @y -> format (concat (toString x) (toString y))
    }
  },

  format 0 // RESULT: (@y -> format (concat (toString 0) (toString y))) 
  format 0 1 // RESULT: (@y -> format (concat (toString "01") (toString y)))
  format 0 1 EOT // RESULT: toString "01" // RESULT: "01"

  "test" ->
    @a =>
      "+" -> * a a 

  // TODO: Define tuples like this?