| From: Greg Hendershott (greghendershott at gmail.com) Date: Wed Jul 20 17:10:56 EDT 2011 |
|
> define factorial(n)
> if {n <= 1}
> 1
> {n * factorial{n - 1}}
Wouldn't it need to be something like:
define( factorial(n)
if {n <= 1}
1
{n * factorial{n - 1}} )
?
That is, `define' itself needs some sort of handling, whether sweet or sour?
On Wed, Jul 20, 2011 at 4:59 PM, Grant Rettke <grettke at acm.org> wrote:
> On Wed, Jul 20, 2011 at 2:24 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:
>> On 2011-07-20 15:19:44 -0400, Asumu Takikawa wrote:
>>> To use, write a #lang line like this:
>>>
>>> #lang asumu/sweet racket
>>>
>>> printf("Hello")
>>
>> Whoops, that should be
>> #lang planet asumu/sweet racket
>
> Thanks.
>
> Just tried this:
>
> #lang planet asumu/sweet racket
>
> define factorial(n)
> if {n <= 1}
> 1
> {n * factorial{n - 1}}
>
> And got
>
> application: bad syntax (illegal use of `.') in: (#<eof> . #<eof>)
>
> In DrRacket, version 5.1.1 [3m].
>
> Did I do something wrong?
>
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users
>