import { handleActions } from "redux-actions";
import { changeSource, step, run } from "actions";

import interpreter from "interpreter";

const initialSource = `+++++++++
[>++++++++>+++++++++++>+++++<<<-]
>.>++.+++++++..+++.>-.-----------
-.<++++++++.--------.+++.------.-
-------.>+.`

const initialState = {
  memory: [],
  output: "",
  pointer: 0,
  programCounter: 0,
  source: initialSource
}

export default handleActions({
  [changeSource]: {
    next: (state, { payload }) => (
      Object.assign({}, state, { source: payload })
    )
  },
  [step]: {
    next: (state, { payload }) => {
      console.log(payload)
      return payload
    }
  },
  [run]: {
    next: (state, { payload }) => {
      console.log(payload)
      return payload
    }
  },
}, initialState)

import { handleActions } from "redux-actions";
import { changeSource, step, run } from "actions";

import interpreter from "interpreter";

const initialSource = `+++++++++
[>++++++++>+++++++++++>+++++<<<-]
>.>++.+++++++..+++.>-.-----------
-.<++++++++.--------.+++.------.-
-------.>+.`

const initialState = {
  memory: [],
  output: "",
  pointer: 0,
  programCounter: 0,
  source: initialSource
}

export default handleActions({
  [changeSource]: {
    next: (state, { payload }) => (
      Object.assign({}, state, { source: payload })
    )
  },
  [step]: { next: (state, { payload }) => (payload) },
  [run]: { next: (state, { payload }) => (payload) },
}, initialState)

Remove debug print