From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- Semestr 3/pf/lista3/procc.ml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 Semestr 3/pf/lista3/procc.ml (limited to 'Semestr 3/pf/lista3/procc.ml') diff --git a/Semestr 3/pf/lista3/procc.ml b/Semestr 3/pf/lista3/procc.ml deleted file mode 100644 index 07f4404..0000000 --- a/Semestr 3/pf/lista3/procc.ml +++ /dev/null @@ -1,30 +0,0 @@ -type ('z,'i) in_channel = - | In of (('z,'i) out_channel -> 'z) - -and ('z,'o) out_channel = - | Out of ('o -> ('z,'o) in_channel -> 'z) - -type ('z,'i,'o) ans = ('z,'i) in_channel -> ('z,'o) out_channel -> 'z - -type ('a,'z,'i,'o) proc = ('a -> ('z,'i,'o) ans) -> ('z,'i,'o) ans - -let send o k in_ch (Out sendd) = - sendd o (In(fun out_ch -> k () in_ch out_ch)) - -let recv k (In recv) out_ch = - recv (Out(fun v in_ch -> k v in_ch out_ch)) - -let exit_k x _ _ = x - -let (<|>>) p1 p2 _ in_ch out_ch = - p2 exit_k - (In(fun m_ch -> p1 exit_k in_ch m_ch)) - out_ch - -let rec stdin_ch = - In (fun (Out send) -> send (read_line ()) stdin_ch) - -let rec stdout_ch = - Out (fun str (In recv) -> print_endline str; recv stdout_ch) - -let run p = p exit_k stdin_ch stdout_ch -- cgit v1.2.3