That's the only thing I think could be substantially improved, though. Personally I find the style where you separate the type signature from the function definition easier to read, for example
How about
<^> : (T -> U) * T? -> U?
<^> (f, a) {
return a.map(f)
}
or even <^> : (T -> U) * T? -> U?
<^> (f, a) -> a.map(f)
which is already pretty close to the Haskell equivalent (<^>) :: (t -> u) -> Maybe t -> Maybe u
(<^>) = fmap
Arguably, Haskell syntax could be improved with more built-in syntax <^> : (t -> u) -> t? -> u?
<^> = fmap
though I haven't thought about what this means for parsing the language.