Generic Templates

31 views
Skip to first unread message

Mike Jones

unread,
Nov 6, 2015, 11:15:08 AM11/6/15
to ats-lang-users
In the book, Ch 17, Genericity... this code:

implement
{a}(*tmp*)
gfact(n) = let
//
overload * with gmul_int_val
//
in
//
if n > 0
then n * gfact<a>(n-1) else gnumber_int<a>(1)
//
end (* end of [gfact] *)

What does the (*tmp*) mean or indicate? Previous examples use {} or (), but not {}().

Hongwei Xi

unread,
Nov 6, 2015, 11:20:52 AM11/6/15
to ats-lan...@googlegroups.com
It is a comment.

I feel the following kind of code looks too ugly: )

implement
{a}
gfact(...) = ...

--
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 http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/ceecef1e-d646-4c21-b819-f41c79c19668%40googlegroups.com.

Mike

unread,
Nov 6, 2015, 2:47:57 PM11/6/15
to ats-lan...@googlegroups.com
Ah, my parser has an imperfection and I saw double parens 

Sent from my iPhone
You received this message because you are subscribed to a topic in the Google Groups "ats-lang-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ats-lang-users/wjXGc0J7qNE/unsubscribe.
To unsubscribe from this group and all its topics, 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 http://groups.google.com/group/ats-lang-users.
Reply all
Reply to author
Forward
0 new messages