<< Prev | - Up - | Next >> |
Write a procedure for the function FoldL
that uses the loop construct and state. Hint: You can abuse a stack to define a data structure for a cell that contains a mutable value. You may also use cells directly.
Write another definition of FoldL
that uses tail recursion but neither loops nor or state.
Reduce an until loop to a while loop.
Write a functional procedure that tests whether a word is accepted by a finite automaton. Is there an algorithm that can do so with linear run time in the size of the word and the given automaton?
Write a functional procedure that tests whether the language accepted by a finite automaton is empty or not. Can you do it in linear time in the size of the automaton?
Something about threads, state, and indeterminism.
Something about exception handling.
<< Prev | - Up - | Next >> |