  This volume contains the proceedings of the Fourth Workshop on Mathematically
Structured Functional Programming (MSFP 2012), taking place on 25 March, 2012
in Tallinn, Estonia, as a satellite event of the European Joint Conferences on
Theory and Practice of Software, ETAPS 2012.
  MSFP is devoted to the derivation of functionality from structure. It
highlights concepts from algebra, semantics and type theory as they are
increasingly reflected in programming practice, especially functional
programming. The workshop consists of two invited presentations and eight
contributed papers on a range of topics at that interface.
