Skip to content

Instantly share code, notes, and snippets.

@bavardage
Created June 23, 2009 20:24
Show Gist options
  • Save bavardage/134817 to your computer and use it in GitHub Desktop.
Save bavardage/134817 to your computer and use it in GitHub Desktop.
type Zipper a = ([a], a, [a])
fibs = ([1,1,2,3,5], 8, [13,21]) :: Zipper Int
left (xs, y, (z:zs)) = (y:xs, z, zs)
*Main> fibs
([1,1,2,3,5],8,[13,21])
*Main> left fibs
([8,1,1,2,3,5],13,[21])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment