Minor fixes
h3rald h3rald@h3rald.com
Sun, 17 Jan 2021 09:59:18 +0000
1 files changed,
3 insertions(+),
3 deletions(-)
jump to
M
site/contents/learn-operators.md
→
site/contents/learn-operators.md
@@ -114,7 +114,7 @@ In this case for example tbe `square` symbol expects a number on the stack, which will be captured to tbe symbol `n` and it will place a number on the stack which needs to be bound in the operator body to the symbol `result`.
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`.@@ -153,7 +153,7 @@ ### Generics
{{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)@@ -179,7 +179,7 @@ 3 5 add ;outputs 8
"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