Basic Flow

beginner1 of 5

Learn about basic flow in fp-ts flow

Code Editor

01-basic-flow.exercise.ts

💻
Loading editor...
Preparing Monaco Editor with TypeScript support

Test Results

Requirements

describe('processNumber', () => {
  it('creates reusable function: (5 * 2) + 10 = "Result: 20"', () => {
    const result = processNumber(5)
    expect(result).toEqual('Result: 20')
  })

  it('creates reusable function: (3 * 2) + 10 = "Result: 16"', () => {
    const result = processNumber(3)
    expect(result).toEqual('Result: 16')
  })

  it('can be called multiple times', () => {
    expect(processNumber(0)).toEqual('Result: 10')
    expect(processNumber(10)).toEqual('Result: 30')
  })
})
🧪

Ready to Test?

Click "Run Tests" to see how your code performs

Pro Tips

💡 Stuck? Here's what to try:

  • • Read the comments in the code carefully
  • • Run tests frequently to get feedback
  • • Check the fp-ts documentation
  • • Use the solution if you need help

🚀 Learning Approach:

  • • Focus on understanding, not just solving
  • • Experiment with different approaches
  • • Think about real-world applications
  • • Build on previous exercises