Convert `close` to Cadence.

See #375.