import Foundation
func printTextDiagonallyRecursivelyLTR(_ spaces: String, _ text: String) {
if !text.isEmpty {
print(spaces + String(text.first!))
let rest = String(text.dropFirst())
printTextDiagonallyRecursivelyLTR(spaces + " ", rest)
}
}
printTextDiagonallyRecursivelyLTR("", "HELLO WORLD")
/*
run:
H
E
L
L
O
W
O
R
L
D
*/