# New extension: Functions

**URL:** <https://forum.codecrafters.io/t/new-extension-functions/2988>\
**Category:** Announcements\
**Created:** [November 19, 2024, 5:20am UTC](https://forum.codecrafters.io/t/new-extension-functions/2988 "2024-11-19T05:20:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy1li](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/andy1li/32/10_2.png) [@andy1li](https://forum.codecrafters.io/u/andy1li)\
**Post date:** [November 19, 2024, 5:20am UTC](https://forum.codecrafters.io/t/new-extension-functions/2988/1 "2024-11-19T05:20:09Z")

</div>

The next extension for the Interpreter challenge is now live: **Functions**.

 ![image](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/8/89e3070279fabe0370df3d58b3243bccab6d4d58.jpeg)

This extension builds on the work from the [previous one](https://forum.codecrafters.io/t/new-extension-control-flow/2691) and covers [Chapter 10](https://craftinginterpreters.com/functions.html) of the book.

By the end of this extension, your interpreter will be able to support defining and calling functions, as well as managing function scopes and return values. Here’s a sneak peek at what you’ll achieve:

```java
var count = 3;

fun tick() {
  if (count > 0) {
    print count;
    count = count - 1;
    return false;
  }
  print "Blast off!";
  return true;
}

while (!tick()) {}

```

Please [give this a try](https://app.codecrafters.io/courses/interpreter/overview) and let us know how it can be improved! @ryan-gang (author of this extension), and I will be available here to help out with any tester or instruction-related issues.

---

<div class="post-metadata">

**Author:** ![ryan-gang](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.codecrafters.io/ryan-gang/32/38_2.png) [@ryan-gang](https://forum.codecrafters.io/u/ryan-gang)\
**Post date:** [November 19, 2024, 5:20am UTC](https://forum.codecrafters.io/t/new-extension-functions/2988/2 "2024-11-19T05:20:09Z")

</div>

[![](https://canada1.discourse-cdn.com/flex003/uploads/codecrafters/original/2X/b/b1b16ecc91404ba1fcfadce644dee9fdd77e23ac.jpeg "Function describe the world?") ](https://www.youtube.com/watch?v=PAZTIAfaNr8)
