Skip to content

Instantly share code, notes, and snippets.

Created Jun 2, 2016
Embed
What would you like to do?
the description for this gist
object Logo {
sealed trait Instruction[A]
case class Forward(position: Position, length: Int) extends Instruction[Position]
case class Backward(position: Position, length: Int) extends Instruction[Position]
case class RotateLeft(position: Position, degree: Degree) extends Instruction[Position]
case class RotateRight(position: Position, degree: Degree) extends Instruction[Position]
case class ShowPosition(position: Position) extends Instruction[Unit]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment