mirror of
https://github.com/Dummi26/mers.git
synced 2025-12-15 03:36:16 +01:00
.
This commit is contained in:
@@ -85,17 +85,19 @@ fn main() {
|
||||
run.run(&mut info_run);
|
||||
}
|
||||
Check::Yes | Check::Only => {
|
||||
let rt = match run.check(&mut info_check, None) {
|
||||
let return_type = match run.check(&mut info_check, None) {
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
eprintln!("check failed: {e}");
|
||||
std::process::exit(36);
|
||||
}
|
||||
};
|
||||
#[cfg(debug_assertions)]
|
||||
dbg!(&return_type);
|
||||
if args.check == Check::Yes {
|
||||
run.run(&mut info_run);
|
||||
} else {
|
||||
eprintln!("return type is {}", rt)
|
||||
eprintln!("return type is {}", return_type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
("a").{ (a) -> a }
|
||||
@@ -1,28 +0,0 @@
|
||||
list := (
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
);
|
||||
|
||||
total := 0
|
||||
t := &total
|
||||
(list, item -> t = (t.deref, item).sum).iter
|
||||
"total: ".print
|
||||
total.println
|
||||
"sum: ".print
|
||||
list.sum.println
|
||||
iter := (list item -> { item.println 12 }).map
|
||||
"---".println
|
||||
list := iter.as_list
|
||||
list.println
|
||||
list.sum.println
|
||||
list.enumerate.as_list.println
|
||||
|
||||
"mers cli: ".print
|
||||
mers_cli.println
|
||||
@@ -1,8 +0,0 @@
|
||||
values := ().as_list
|
||||
counter := 0
|
||||
counter_ref := &counter
|
||||
{val -> {
|
||||
counter_ref = (counter_ref.deref, 1).sum
|
||||
counter_ref.deref.println
|
||||
if (counter_ref.deref, 5).eq { (()) } else { () }
|
||||
}}.loop
|
||||
Reference in New Issue
Block a user