Skip to content

Commit

Permalink
docs for add
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSecondComing123 committed Mar 9, 2022
1 parent b67c407 commit 6fcbc1a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
`+` (Addition operator/Concatenation
        Adds two numbers or concatenates two iterables.

```
Overloads:
int a, int b: a+b
str a, str b: concat(a, b)
```
4 changes: 2 additions & 2 deletions functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@


def Add(a, b, ctx=ctx):
"""Addition/Concatanation"""
"""Addition/Concatenation"""
if typecheck(args=[a, b], types=[Rational, Rational]):
return add(a, b)
elif typecheck(args=[a, b], types=[str, str]):
return concat(a, b)


def Sub(a, b, ctx=ctx):
"""Subtract"""
"""Subtraction"""
if typecheck(args=[a, b], types=[Rational, Rational]):
return subtract(a, b)

Expand Down

0 comments on commit 6fcbc1a

Please sign in to comment.