Sign up for a GitHub account Sign in All Gists lykkin / gist:a9a05c30bdb8c9d7b608 Created February 24, 2015 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav View gist:a9a05c30bdb8c9d7b608 gistfile1.hs Raw File suppressed. Click to show. 1 2 3 4 5 type Peg = String type Move = ( Peg , Peg ) hanoi :: Integer -> Peg -> Peg -> Peg -> [ Move ] hanoi disks from to storage | disks > 1 = (hanoi (disks - 1 ) from storage to) ++ [(from, to )] ++ (hanoi (disks - 1 ) storage to from) | otherwise = [(from, to )] Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment /.discussion-timeline /.gist-co...