Fix errors in README examples
This commit is contained in:
		
							parent
							
								
									1688296528
								
							
						
					
					
						commit
						2b840ff8b9
					
				
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							@ -15,9 +15,9 @@ The following is a non-comprehensive list of stuff that currently works.
 | 
				
			|||||||
## Assignment & Declaration
 | 
					## Assignment & Declaration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
a: str= "Hello, World!\n";
 | 
					a: str = "Hello, World!\n";
 | 
				
			||||||
b: int = 0;
 | 
					b: int = 0;
 | 
				
			||||||
c: str;
 | 
					c: str; // declared, but not yet assigned
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Structs
 | 
					## Structs
 | 
				
			||||||
@ -70,7 +70,7 @@ enum IntResult {
 | 
				
			|||||||
	Err(Error)
 | 
						Err(Error)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
result: IntResult = Ok(5);
 | 
					result: IntResult = IntResult.Ok(5);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
match result in {
 | 
					match result in {
 | 
				
			||||||
	case Ok(num) do { ... } // num is defined in this scope
 | 
						case Ok(num) do { ... } // num is defined in this scope
 | 
				
			||||||
@ -86,14 +86,14 @@ func random_number(seed: int) -> int {
 | 
				
			|||||||
	return 42;
 | 
						return 42;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my_random_number = random_number(69);
 | 
					my_random_number: int = random_number(69);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func min(a: int, b: int) -> int {
 | 
					func min(a: int, b: int) -> int {
 | 
				
			||||||
	if a < b return a;
 | 
						if a < b return a;
 | 
				
			||||||
	return b;
 | 
						return b;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
the_min = min(5, 10);
 | 
					the_min: int = min(5, 10);
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Arrays
 | 
					## Arrays
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user