A linear stream is a bit like an object with two methods: one for eval and the other for free; !xs calls the eval method and ~xs calls the free method.
On Sun, May 6, 2018 at 12:11 AM, Steinway Wu <steinway...@gmail.com> wrote: > I have a follow up question. How does `~xs` as in `$ldelay(..., ~xs)` > handle a stream of linear elements, or even linear closures? > > On Saturday, May 5, 2018 at 11:23:33 PM UTC-4, Steinway Wu wrote: >> >> Oh, there's a gfree_val and gfree_ref >> >> On Saturday, May 5, 2018 at 11:01:16 PM UTC-4, gmhwxi wrote: >>> >>> Is there a template called gfree? You can put gfree<a>(x) there. >>> For non-linear x, >>> >>> implement(a:t@ype) gfree<a>(x) = (). >>> >>> On Saturday, May 5, 2018 at 10:51:34 PM UTC-4, Steinway Wu wrote: >>>> >>>> Hi, >>>> >>>> Even though `stream_vt (a)` is defined on `a: vt@ype`, many library >>>> functions for `stream_vt (a)` is only defined on `a: t@ype`. It feels >>>> like `a: t@ype` is easier to work with since there's no need to free a >>>> single element in some of the library functions, like >>>> `stream_vt_make_cons`. Is there other reasons not to support an element of >>>> some true view type? What should I put in the 2nd arg in `$ldelay` if I'd >>>> like to implement `stream_vt_make_cons` for `a: vt@ype`? >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "ats-lang-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ats-lang-users+unsubscr...@googlegroups.com. > To post to this group, send email to ats-lang-users@googlegroups.com. > Visit this group at https://groups.google.com/group/ats-lang-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ats-lang-users/b113df86-f9da-4ecf-9781-4eb0ef83dad3% > 40googlegroups.com > <https://groups.google.com/d/msgid/ats-lang-users/b113df86-f9da-4ecf-9781-4eb0ef83dad3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLqU5ym43Jp4GsWT0LLvXFViVe3dmYAYgc6edECEpu7miA%40mail.gmail.com.