Created
February 9, 2011 23:28
-
-
Save butaji/819565 to your computer and use it in GitHub Desktop.
http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Laemmel-Advanced-Functional-Programming-The-Expression-Problem Better solution for the slide on 38 minute
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PrettyPrinterWithNeq : PrettyPrinter | |
{ | |
public override string PrettyPrint(Expr that) | |
{ | |
var n = that as Neg; | |
if (n != null) return "-(" + PrettyPrint(n.operand) + ")"; | |
return base.PrettyPrint(that); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment