fun {a:vt0p} {b:vt0p} stream_vt_map_con (xs: stream_vt (a)) : stream_vt_con (b) = let val xs_con = !xsin case+ xs_con of
| @stream_vt_cons(x, xs) => let val y = stream_vt_map$fopr<a><b> (x) // fopr is of type {a,b:vt@ype} &a >> a?! -> b val xs = xs val () = free@ (xs_con) in stream_vt_cons{b}(y, stream_vt_map<a><b> (xs)) end | ~stream_vt_nil((*void*)) => stream_vt_nil()end
--
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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@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/a443c141-c62d-49a3-88d9-68ab64640cbb%40googlegroups.com.
fun {a,b:vt@ype} stream_vt_map_con (xs: stream_vt a): stream_vt_con b
fun {a,b:vt@ype} stream_vt_map$fopr (a):<cloref1> b
What about this? Let the worker function consume a. And in map, free the constructor, instead of unfold the constructor.
fun {a,b:vt@ype} stream_vt_map_con (xs: stream_vt a):
stream_vt_con b
fun {a,b:vt@ype} stream_vt_map$fopr (a -<cloref1> b): b
--
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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@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/f72cd27d-4084-41b6-a6fe-b94a7e3e1563%40googlegroups.com.
1.When [a] is a linear type, a?! is only the data part of [a] (that is, there is no view in a?!).When [a] is non-linear, then a?! is just [a].
--
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+unsubscribe@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/7b1efc5a-cc98-4a50-99e8-78c25e3c3372%40googlegroups.com.
--
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+unsubscribe@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/fb87ad65-511f-487b-b96c-11a8387a0ae5%40googlegroups.com.
So if `?!` means “data part” may be it’s better to read `?` as “no data part” instead of “unintitialized”, although it may be implied.
[…]
--
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+unsubscribe@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/d04ae174-6bed-446c-a055-ff5e0686180c%40googlegroups.com.