Scheme implemented in Swift