← Back to Prompt Library
Code

Write a Function From Description

Generate a function from plain English requirements.

Write a [LANGUAGE] function that [DESCRIPTION OF WHAT IT SHOULD DO]. Input: [DESCRIBE INPUTS AND TYPES]. Output: [DESCRIBE EXPECTED OUTPUT AND TYPE]. Handle edge cases: [LIST ANY EDGE CASES]. Include inline comments for non-obvious logic. Write it in a production-ready style — proper error handling, meaningful variable names, and following [LANGUAGE] best practices.
generatefunctionbuild

Want to use this with one click inside ChatGPT?

Get TresPrompt →