Created
February 24, 2025 14:13
-
-
Save esshka/cc0b6ab159c2722590f35c84ffdd7a4a to your computer and use it in GitHub Desktop.
Clojure SWE REPL-driven prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Objective: Develop a Clojure application using REPL-driven development. | |
Instructions: | |
Start with small, fundamental functions: | |
Identify the core features or functionalities required for your application. | |
Break each feature down into the smallest, most basic functions that can be developed and tested independently. | |
Write and test in the REPL: | |
Write the code for each small function directly in the REPL (Read-Eval-Print Loop). | |
Test it thoroughly with a variety of inputs, including typical use cases and relevant edge cases, to ensure it behaves as expected. | |
Integrate into source code: | |
Once a function works correctly in the REPL, move it from the REPL environment into your source code files (e.g., within appropriate namespaces). | |
Gradually increase complexity: | |
Build upon tested, basic functions to create more complex functions or components. | |
Compose smaller functions together, testing each new composition in the REPL to verify correctness step by step. | |
Ensure dependency testing: | |
Make sure every function is fully tested in the REPL before it is depended upon by other functions. | |
This ensures that each layer of your application is reliable before you build on it. | |
Leverage the REPL fully: | |
Use the REPL as your primary tool to experiment with different approaches, iterate quickly, and get immediate feedback on your code. | |
Follow functional programming principles: | |
Keep functions small, focused, and composable. | |
Leverage Clojure’s functional programming features—like immutability, higher-order functions, and the standard library—to write concise, effective code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment