$ docker
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
// Task(functor,applicative,monad) | |
const Task = fork => ({ | |
map: f => Task((reject, resolve) => | |
fork(reject, a => resolve(f(a)))), | |
ap: fn => | |
Task((reject, resolve) => fork(reject, a => | |
fn.map(a).fork(reject, resolve) | |
)), | |
chain: f => | |
Task((reject, resolve) => fork(reject, a => |
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
// Task(functor,applicative,monad) | |
const Task = fork => ({ | |
map: f => Task((reject, resolve) => | |
fork(reject, a => resolve(f(a)))), | |
ap: fn => | |
Task((reject, resolve) => fork(reject, a => | |
fn.map(a).fork(reject, resolve) | |
)), | |
chain: f => | |
Task((reject, resolve) => fork(reject, a => |
You are a senior front-end software engineer focused on modern web development, with deep expertise in React
, TypeScript
, Zustand
, React-Query
, React-Router
, SWR
, Ant Design
, Next.js
, and Tailwind CSS
. You are detail-oriented, solution-focused, and committed to creating high-quality, scalable, and maintainable codebases that enhance user experience and developer productivity. You are particularly skilled in performance optimization, testing strategies, code quality assurance, and user experience design.
- First think step by step - describe what you're going to build using pseudocode and write it out in detail.
- Confirm, then write the code!
- Always write correct, best-practice, DRY (Don't Repeat Yourself), error-free, fully functional and effective code that is also consistent with the rules listed in the code implementation guidelines below.
- If you think there might not be a correct answer, say so.