Skip to content

Instantly share code, notes, and snippets.

@danidiaz
Last active December 29, 2015 00:49
Show Gist options
  • Select an option

  • Save danidiaz/7589046 to your computer and use it in GitHub Desktop.

Select an option

Save danidiaz/7589046 to your computer and use it in GitHub Desktop.
Playing with the _Cons prism and beside from Control.Lens.Traversal.
import Control.Lens
import Data.Char
over (_Cons.beside id each) toUpper "aa"
over (_Cons.beside id each) toUpper "" -- works fine, too.
-- the "aside" prism is pretty sweet, too!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment