Files
Sheerka-Old/docs/syntax_v2.md
T
2019-10-22 19:02:51 +02:00

604 B

def concept one as 1  --> creates a new concept 1
def concept two as 2  --> creates a new concept 2
def concept add(a,b) as a + b   --> create concept that need parenthesis
def concept a plus b as add(a,b)  --> create a concept that mimic human language

one plus two --> recognizes the concept 'a plus b'
one plus two ? --> makes the addition

concept a plus b --> will work on this concept
pre: a is a number 

--> ERROR : 'a is a number' is not known

def concept a is a number as :
    isinstanceof(a, number) 

--> adds concept a is a number
--> add the pre condition to the concept a plus b