Instead of stating rules, I will just give a few examples. More will be 
said later.

Computing the length of a given list:

fun list_length(xs: list(a)): sint

Nothing special here. The full name of the function should be 
list_length_sint

Computing the length of a given linear list:

fun list_vt_length0(xs: list_vt(a)): sint // xs is freed after the call
fun list_vt_length1(xs: !list_vt(a)): sint // xs is still available after 
the call

Linear list reverse-append:

fun list_vt_rappend01(xs: list_vt(a), ys: !list_vt(a)): list_vt(a)

The full name of the function should be: list_vt_rappend0_llist__llist1.
This name along indicates that the first argument (xs) is consumed;
the second argument (ys) is kept (llist1); the return value is a linear list
(llist).

Enough beans are spilled here :)

Cheers,

--Hongwei



-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/d250f670-e9bd-4035-92a9-ab454856dde4n%40googlegroups.com.

Reply via email to