C++ still doesn&#x27;t have (tagged) union types so you&#x27;d have to implement Maybe by hand, which is a little tedious. But I don&#x27;t see anything in this code that requires laziness or the Haskell type system, so you can translate it pretty directly into pretty much any language (though as sibling mentions, in a language without TCO you might have to manually trampoline it - again tedious, and unperformant).