44 <img src="image/logo.svg" height="200" alt="Mamba logo"/>
55 <br/><br/>
66 <a href="https://github.com/JSAbrahams/mamba/actions/workflows/rust.yml">
7- <img src="https://img.shields.io/github/workflow/status/JSAbrahams/mamba/Test ?style=for-the-badge" alt="GitHub Workflow Status">
7+ <img src="https://img.shields.io/github/actions/ workflow/status/JSAbrahams/Mamba/test.yml ?style=for-the-badge" alt="GitHub Workflow Status">
88 </a>
99 <a href="https://app.codecov.io/gh/JSAbrahams/mamba/">
1010 <img src="https://img.shields.io/codecov/c/github/JSAbrahams/mamba?style=for-the-badge" alt="Codecov coverage">
2525
2626<h1 align =" center " >Mamba</h1 >
2727
28- This is the Mamba programming language.
28+ This is the Mamba programming language.
2929Mamba is like Python, but with a few key features:
3030
3131- Strict static typing rules, but with type inference so it doesn't get in the way too much
@@ -36,7 +36,7 @@ Mamba is like Python, but with a few key features:
3636- Pure functions, or, functions without side effects
3737
3838This is a transpiler, written in [ Rust] ( https://www.rust-lang.org/ ) , which converts Mamba source files to Python source
39- files.
39+ files.
4040Mamba code should therefore be interoperable with Python code.
4141Functions written in Python can be called in Mamba and vice versa (from the generated Python files).
4242
@@ -66,6 +66,7 @@ Notice how here we specify the type of argument `x`, in this case an `Int`, by w
6666This means that the compiler will check for us that factorial is only used with integers as argument.
6767
6868_ Note_ One could use [ dynamic programming] ( https://en.wikipedia.org/wiki/Dynamic_programming ) in the above example so that we consume less memory:
69+
6970``` mamba
7071def factorial(x: Int) -> Int => match x
7172 0 => 1
@@ -128,7 +129,7 @@ my_server.disconnect()
128129
129130### 🗃 Type refinement (🇻 0.6+)
130131
131- As shown above Mamba has a type system.
132+ As shown above Mamba has a type system.
132133Mamba however also has type refinement features to assign additional properties to types.
133134Lets expand our server example from above, and rewrite it slightly:
134135
@@ -211,7 +212,7 @@ Type refinement allows us to do some additional things:
211212
212213Mamba has features to ensure that functions are pure, meaning that if ` x = y ` , for any ` f ` , ` f(x) = f(y) ` .
213214(Except if the output of the function is say ` None ` or ` NaN ` .)
214- By default, functions are not pure, and can read any variable they want, such as in Python.
215+ By default, functions are not pure, and can read any variable they want, such as in Python.
215216When we make a function ` pure ` , it cannot:
216217
217218- Read non-final properties of ` self ` .
0 commit comments