I once prototyped a language that looked somewhat like the following:
func main [
init_counter
init_flag
while flag [
update_counter
update_flag
]
]
proc init_counter [
exp counter := 10
]
proc init_flag [
exp flag := true
]
proc update_counter with counter [
counter--
]
proc update_flag with counter, flag [
if counter == 0 [
flag = false
]
]
and decided to try implementing a similar 'thing' in rust
use *;
proc!;
proc!;
proc!;
proc!;
not smart enough for auto type checking though :/