Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (7 sloc) 195 Bytes
module Main where
data Graph a b c = Graph (a, b, c) deriving Show
A = 'A'
B = 'B'
C = 'C'
hanoi 0 = Graph (A, B, C)
hanoi n = hanoi (n-1) Graph (Graph (a,c,b), Graph (c,b,a), Graph (b,a,c))
Something went wrong with that request. Please try again.