filepath icon indicating copy to clipboard operation
filepath copied to clipboard

Add lens/idempotence properties

Open ndmitchell opened this issue 11 years ago • 0 comments

Two useful properties of filepath operators are being idempotent (as you might hope normalise was) and being valid lenses, specifically obeying:

view l (set l b a)  = b
set l (view l a) a  = a
set l c (set l b a) = set l c a

I should probably add functions to capture these properties directly in the TestUtils code, then write things like lens getExtension replaceExtension for those which are actually true (I'm not sure extensions are, but some will be).

ndmitchell avatar Nov 30 '14 20:11 ndmitchell