{- Functions -} def foo (channel : ^String) : String = ( val str = (read channel) ((string.pr str); (+$ str " i kot")) ) new c : ^String run c!"Ala" run print! (foo c) {- def f (c : ^Int) : Int = (val i = (read c) (int.pr i); i) new c1 : ^Int run c1 ! 10 val result = (f c1) -} {- {- Polymorphic (or existential) types -} def f (#X c : ^X) : X = (val res = (read c) res) new c : ^Int new d : ^String run ( c! 33 | d! "Ala" | printi! (f c) | print! (f d) ) -}