Simplified ed clone in Haskell (written in the context of an intro to FP course)