This seems a catch-22: I want to render code in an org-mode export (html or latex pdf) where the snippet below done as a ~code block

> (cons 1 nil) \to (1)

actually renders \to as a proper right arrow (yields). Of course if I do the snippet as inline latex

$> (cons 1 nil) \to (1)$

I get the properly rendered right arrow, but now it's not in the sans mono code font. What can I do to have my cake and eat it too?

LB