Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
h3rald committed Jan 17, 2021
1 parent 14832e3 commit 094eca6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/contents/learn-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ In this case for example tbe `square` symbol expects a number on the stack, whic

In a signature, a type expression must precede the capturing symbol. Such type expression can be:

* One of the following shorthand symbols identifying a well-known {{m}} base type (see the {#link-page||chapter#} section for more information): `a`, `bool`, `null`, `str`, `int`, `num`, `float`, `'sym`, `quot`, or `dict`.
* One of the following shorthand symbols identifying a well-known {{m}} base type (see the {#link-page||reference||reference#} section for more information): `a`, `bool`, `null`, `str`, `int`, `num`, `float`, `'sym`, `quot`, or `dict`.
* A typed dictionary like `dict:module` or `dict:datastore`.
* A type class (see below).
* a union of types/typed dictionaries/type classes, like `str|int`.
Expand Down Expand Up @@ -153,7 +153,7 @@ This operator will raise an error if anything other than a quotation of strings

{{m}} supports generics in operator signatures. in other words, you can define a custom type alias on-the-fly directly in an operator signature, like this:

````
```
(
symbol add
((string|num|quot :t) :a t :b ==> t :result)
Expand All @@ -179,7 +179,7 @@ Note that the value of `t` is evaluated to the type of the first value that is p
"hello, " "world" ;outputs "hello, world"

while tbe fullowing will raise an error, because the value of `t` from `num` to `quot` within tbe same operator use:
while tbe fullowing will raise an error, because the value of `t` from `num` to `quot` within the same operator use:

12 "test" add ;raises an error
Expand Down

0 comments on commit 094eca6

Please sign in to comment.