11#ifdef ARDUINO
22 #include < Arduino.h>
3+ // #endif
4+ // #ifdef __AVR__
35 #include < streamFlow.h>
46 using namespace StreamFlow ;
57 #define cout Serial
@@ -30,64 +32,67 @@ void run() {
3032 static cex const auto l1{list (1 )};
3133 static cex const auto l2{list (1 ,2 )};
3234 static cex const auto l3{list (1 ,2 ,3 )};
33- // static cex const auto e1=id("ok")("zZz");
34- // static cex const auto e2=_true("ok")("fail")("zZz");
35- // static cex const auto e3=_S(id)(id)(id)("ok")("zZz");
36- // static cex const auto e4=_B(id)(id)("ok")("zZz");
37- // static cex const auto e5=_C(_true)("fail")("ok")("zZz");
38- // static cex const auto e6=_W(_true)("ok")("zZz");
39- // static cex const auto e7=_T("ok")(id)("zZz");
40- // static cex const auto e8=_V("ok")("fail")(_true)("zZz");
41- // static cex const auto e9=toInt(head(range(n1)(n2)));
42- // static cex const auto e10=_add(3)(5);
43- // static cex const auto e11=is0(length(nil))("yes")("no");
44- // static cex const auto e12=Expr<Is0,Expr<Length,Nil>>{}("yes")("no");
35+ static cex const auto e1 =id (" ok" )(" zZz" );
36+ static cex const auto e2 =_true (" ok" )(" fail" )(" zZz" );
37+ static cex const auto e3 =_S (id)(id)(id)(" ok" )(" zZz" );
38+ static cex const auto e4 =_B (id)(id)(" ok" )(" zZz" );
39+ static cex const auto e5 =_C (_true)(" fail" )(" ok" )(" zZz" );
40+ static cex const auto e6 =_W (_true)(" ok" )(" zZz" );
41+ static cex const auto e7 =_T (" ok" )(id)(" zZz" );
42+ static cex const auto e8 =_V (" ok" )(" fail" )(_true)(" zZz" );
43+ static cex const auto e9 =toInt (head (range (n1)(n2)));
44+ static cex const auto e10 =_add (3 )(5 );
45+ static cex const auto e11 =is0 (length (nil))(" yes" )(" no" );
46+ static cex const auto e12 =Expr<Is0,Expr<Length,Nil>>{}(" yes" )(" no" );
47+ static cex const auto e13 =beta (toInt (length (take (n2)(l3))));// esp12 reset
48+ static cex const auto e14 =beta (toInt (length (concat (l1)(l2))));// esp12 reset
49+ static cex const auto e15 =beta (toInt (head (drop (n5)(_map (mul (n2))(nats)))));
50+ static cex const auto e16 =beta (head (yo::reverse (l2)));
51+ static cex const auto e17 =beta (toInt (head (tail (nats))));// cant print this steps, there is an infinit list there
52+ static cex const auto e18 =beta (head (filter (flip (gt)(n2))(nats)));
53+ // static cex const auto e19=beta(toInt(fst(head(zip(l2)(nats)))));//<--------- this really messes the esp12.. why?
4554 cout<<" start" <<endl;
46- // test(e1);
47- // test(e2);
48- // test(e3);
49- // test(e4);
50- // test(e5);
51- // test(e6);
52- // test(e7);
53- // test(e8);
54- // test(e1);
55- // test(e2);
56- // test(e3);
57- // test(e4);
58- // test(e5);
59- // test(e6);
60- // test(e7);
61- // test(e8);
62- // test(e9);
63- // test(e10);
64- // test(e11);
65- // test(e12);
66- // test(head(l1));
67- // test(null(nil)("yes")("no"));
68- // test(null(l1)("yes")("no"));
69- // test(is0(n0)("yes")("no"));
70- // test(is0(n1)("yes")("no"));
71- // test(e12);//testing typelevel construct
55+ test (e1 );
56+ test (e2 );
57+ test (e3 );
58+ test (e4 );
59+ test (e5 );
60+ test (e6 );
61+ test (e7 );
62+ test (e8 );
63+ test (e1 );
64+ test (e2 );
65+ test (e3 );
66+ test (e4 );
67+ test (e5 );
68+ test (e6 );
69+ test (e7 );
70+ test (e8 );
71+ test (e9 );
72+ test (e10 );
73+ test (e11 );
74+ test (e12 );
75+ test (e13 );
76+ test (e14 );
77+ test (e15 );
78+ test (e16 );
79+ test (e17 );
80+ test (e18 );
81+ // test(e19);
82+ test (null (nil)(" yes" )(" no" ));
83+ test (null (l1)(" yes" )(" no" ));
84+ test (is0 (n0)(" yes" )(" no" ));
85+ test (is0 (n1)(" yes" )(" no" ));
7286 // test(length(nil));
7387 // test(length(drop(n1)(l1)));
7488 // test(head(l2));
7589 // test(last(l2));
76- // test(head(nats));
77- // test(toInt(head(drop(n5)(_map(mul(n2))(nats)))));
78-
79- // test(toInt(length(take(n2)(l3))));//esp12 reset
80- // test(toInt(length(concat(l1)(l2))));//esp12 reset
81-
82- steps (toInt (length (l2)));
83- // test(head(yo::reverse(l2)));
84- // test(toInt(head(tail(nats))));
85- // test(head(filter(flip(gt)(n2))(nats)));
86- // test(toInt(snd(head(zip(l2)(nats)))));
90+ // test(head(nats));//head of infinit list
8791
8892 // mixing with c++ expr --
89- // cout<<beta(toInt(n2))*3<<endl;
90- // cout<<beta(toInt(mul(n2)(n3)))*3<<endl;
93+ cout<<" C++ mix --------------" <<endl;
94+ cout<<beta (toInt (n2))*3 <<endl;
95+ cout<<beta (toInt (mul (n2)(n3)))*3 <<endl;
9196
9297 cout<<" end" <<endl;
9398}
@@ -96,10 +101,13 @@ void run() {
96101 void setup () {
97102 Serial.begin (115200 );
98103 while (!Serial);
104+ delay (2000 );
99105 Serial.println (" Yolanda 0.3.x" );
106+ }
107+ void loop () {
100108 run ();
109+ delay (1000 );
101110 }
102- void loop () {delay (1 );}
103111#else
104112 int main () {
105113 run ();
0 commit comments