Purely functional programming for systems programming