Playground Documentation Challenges Full Docs
← All Challenges

#7. Color Cycle

Beginner <…> type()

Working with a non-boolean type! Given a color type with atoms red, green, blue and a shift function that cycles colors, prove that shift(shift(shift(red))) returns to red.

Hint

Use nested substitutions: <shift(<shift(<shift(red)>)>)>. Inside out: shift(red) -> green, shift(green) -> blue, shift(blue) -> red.

Your Solution
Output