# Getting Clojure: 'compute-area' does not compile (page 89)

**URL:** <https://forum.devtalk.com/t/getting-clojure-compute-area-does-not-compile-page-89/25484>\
**Category:** PragProg Customers\
**Tags:** book-getting-clojure, errata\
**Created:** [16 October 2021 20:03 UTC](https://forum.devtalk.com/t/getting-clojure-compute-area-does-not-compile-page-89/25484 "2021-10-16T20:03:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ted](https://forum.devtalk.com/user_avatar/forum.devtalk.com/ted/32/709_2.png) [@Ted](https://forum.devtalk.com/u/Ted)\
**Post date:** [16 October 2021 20:03 UTC](https://forum.devtalk.com/t/getting-clojure-compute-area-does-not-compile-page-89/25484/1 "2021-10-16T20:03:24Z")

</div>

The top of page 89 states:

> and we also got the calculation wrong:
> 
> ```auto
> user=> (defn compute-area [diameter]
> #_=> (* PI radius (/ diameter 2.0)))
> #'user/compute-area
> 
> ```

The code above does not compile:

```auto
Unable to resolve symbol: radius in this context

```

The intended code is probably something like:

```auto
(defn compute-area [diameter]
  (let [radius (/ diameter 2.0)]
    (* PI radius radius)))

```
