4 ms·
What are the functional equivalents of off-by-one?
by PeterisP 12y ago
What are the functional equivalents of off-by-one?
- nmrm2 12y agoFolding with the wrong initial value. Recursive functions where the base case is improperly defined. Stuff like that I consider 'functional off-by-one' because the student understand the general shape of the correct solution but gets a detail about iteration/recursion incorrect at the boundary. edit: oh, also, I guess literally off-by-one errors are also possible in any language that allows any sort of side effect, but that's kind of a stupid degenerate case :-) (edit: possible, definitely not popular... wrong word there, sorry).