Upcoming Cat 1.0 beta 5 features

12 views
Skip to first unread message

Christopher Diggins

unread,
May 11, 2008, 1:26:16 PM5/11/08
to catla...@googlegroups.com
Hi All,

This is an advance notice that the next beta release of Cat supports
local defines. The current version in SVN already supports the
feature. This is an extension to the core language (like named
parameters), and is in fact implemented using named parameters.

An example is:

define f
define g { 1 }
define h { + }
{ g g h }

This translates to:

define f_inner(g h) { g apply g apply h apply }
define f { [1] [+] f_inner }

Note that mututal recursion within local defines are not supported.

Thanks to Chris Rathman for motivating this feature through his
efforts to translate the SICP into Cat
(http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Cat:Chapter_1)

Note that the latest release of Cat supports TCO, which should help
some of the problems that Chris had with stack overflow.

- Christopher

Reply all
Reply to author
Forward
0 new messages