Membrane systems are described by a language in which multisets of objects are encapsulated in hierarchical structures of compartments. The language provides primitives for parallel communication of objects across membranes and a primitive for membrane creation. The behaviour of each membrane is specified by means of multiset rewriting rules. We provide a compositional semantics for membrane systems by using the continuation passing style and metric spaces.