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