This file contains hidden or 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
| # This is a shell archive. Remove anything before this line, then | |
| # unpack it by saving it in a file and typing "sh file". (Files | |
| # unpacked will be owned by you and have default permissions.) | |
| # | |
| # This archive contains: | |
| # Makefile ping.1 ping.c ping.shar newping.1 newping.c | |
| echo x - Makefile | |
| cat > "Makefile" << '//E*O*F Makefile//' |
This file contains hidden or 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
| import scala.util.parsing.combinator._ | |
| abstract class Value { | |
| def eval():Double | |
| } | |
| case class Number(n:Double) extends Value { | |
| def eval():Double = n | |
| } | |
| case class Binomial(op: String, v1:Value, v2:Value) extends Value { | |
| def eval():Double = op match { |
NewerOlder