(state: State)
| 192 | } |
| 193 | |
| 194 | function processCursorLeft(state: State) { |
| 195 | if (state.cursor <= 0) { |
| 196 | return Effect.succeed(Action.Beep()) |
| 197 | } |
| 198 | const cursor = state.cursor - 1 |
| 199 | return Effect.succeed( |
| 200 | Action.NextFrame({ |
| 201 | state: { ...state, cursor, error: Option.none() } |
| 202 | }) |
| 203 | ) |
| 204 | } |
| 205 | |
| 206 | function processCursorRight(state: State) { |
| 207 | if (state.cursor >= state.value.length) { |
no outgoing calls
no test coverage detected
searching dependent graphs…