Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Fool's Functions

This prompt is designed to teach you how to define and use functions in FoolScript.

Setup

In the .github/prompts folder of your project, add a new file called fools-functions.prompt.md.

Usage

Example that will use the current language:

Terminal window
#file:fools-functions.prompt.md

Example that will use Python:

Terminal window
#file:fools-functions.prompt.md Python

Prompt

Provide a quick outline on how to write a function in the current language.
Be brief and include the following if they apply:
## No arguments, no return value.
## With arguments, with return value.
## With named arguments.
## With default arguments.
## Anonymous function.
## Anything else you think is important.
Begin your response with an empty markdown block. Add 3 backticks (```) before the response. For example:
```markdown
```
Response...