Library zoo_std.clist__code
Require Import zoo.prelude.
Require Import zoo.language.typeclasses.
Require Import zoo.language.notations.
Require Import zoo.options.
Notation "'clistู Closed'" := (
in_type "zoo_std.clist.t" 0
)(in custom zoo_tag
).
Notation "'clistู Open'" := (
in_type "zoo_std.clist.t" 1
)(in custom zoo_tag
).
Notation "'clistู Cons'" := (
in_type "zoo_std.clist.t" 2
)(in custom zoo_tag
).
Definition clistู app : val :=
๐ฟ๐ฒ๐ฐ "app" "t1" "t2" โ
๐บ๐ฎ๐๐ฐ๐ต "t1" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
"t2"
| clistู Cons "v" "t1" โ
โclistู Cons[ "v", "app" "t1" "t2" ]
๐ฒ๐ป๐ฑ.
Definition clistู rev_app : val :=
๐ฟ๐ฒ๐ฐ "rev_app" "t1" "t2" โ
๐บ๐ฎ๐๐ฐ๐ต "t1" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
"t2"
| clistู Cons "v" "t1" โ
"rev_app" "t1" โclistู Cons[ "v", "t2" ]
๐ฒ๐ป๐ฑ.
Definition clistู iter : val :=
๐ฟ๐ฒ๐ฐ "iter" "fn" "param" โ
๐บ๐ฎ๐๐ฐ๐ต "param" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
()
| clistู Cons "v" "t" โ
"fn" "v" โฎ
"iter" "fn" "t"
๐ฒ๐ป๐ฑ.
Require Import zoo.language.typeclasses.
Require Import zoo.language.notations.
Require Import zoo.options.
Notation "'clistู Closed'" := (
in_type "zoo_std.clist.t" 0
)(in custom zoo_tag
).
Notation "'clistู Open'" := (
in_type "zoo_std.clist.t" 1
)(in custom zoo_tag
).
Notation "'clistู Cons'" := (
in_type "zoo_std.clist.t" 2
)(in custom zoo_tag
).
Definition clistู app : val :=
๐ฟ๐ฒ๐ฐ "app" "t1" "t2" โ
๐บ๐ฎ๐๐ฐ๐ต "t1" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
"t2"
| clistู Cons "v" "t1" โ
โclistู Cons[ "v", "app" "t1" "t2" ]
๐ฒ๐ป๐ฑ.
Definition clistู rev_app : val :=
๐ฟ๐ฒ๐ฐ "rev_app" "t1" "t2" โ
๐บ๐ฎ๐๐ฐ๐ต "t1" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
"t2"
| clistู Cons "v" "t1" โ
"rev_app" "t1" โclistู Cons[ "v", "t2" ]
๐ฒ๐ป๐ฑ.
Definition clistู iter : val :=
๐ฟ๐ฒ๐ฐ "iter" "fn" "param" โ
๐บ๐ฎ๐๐ฐ๐ต "param" ๐๐ถ๐๐ต
| clistู Closed โ
๐ณ๐ฎ๐ถ๐น
| clistู Open โ
()
| clistู Cons "v" "t" โ
"fn" "v" โฎ
"iter" "fn" "t"
๐ฒ๐ป๐ฑ.