Based on 0 ratings:
Sign in to rate
< Back

Haskell Lens library (operators and functions)

1.28MB. 0 audio & 15 images. Updated 2014-04-26.


The Haskell "lens" library is (in)famous for being difficult due to its massive amount of operators. This deck tries to address this issue by putting all the operators one needs to know in a single place.

Sample (from 21 notes)

Cards are customizable! When this deck is imported into the desktop program, cards will appear as the deck author has made them. If you'd like to customize what appears on the front and back of a card, you can do so by clicking the Edit button, and then clicking the Cards button.
Front ^!
Back Perform a monadic action, e.g. ["hello", "world"] ^! traverse.act putStrLn will print both strings
Front ^?
Back Return Just first target or Nothing, e.g. "world" ^? ix 3 == Just 'l', Left 4 ^? _Right == Nothing
Front over
Back Modify all targets of a lens or traversal with a function, e.g. over mapped (*10) [1, 2, 3] == [10, 20, 30]

After the file is downloaded, double-click on it to open it in the desktop program.

At this time, it is not possible to add shared decks directly to your AnkiWeb account - they need to be added from the desktop then synchronized to AnkiWeb.

Write a Review