
3 Oct
2013
3 Oct
'13
4:08 a.m.
Simon Peyton-Jones
Friends
snip
The use-case everyone starts with is nested records, but I'd like to go beyond that. The next levels seem to be:
* Lenses as views of data that isn't "really there" e.g. regarding a record with rectangular coordinates as having polar coordinates too.
Along these lines, I've found lenses to be quite useful in providing a means of peering into and modifying packed binary data structures and bitfields. One example would be lines 50 - 100 of this module[1]. Cheers, - Ben [1] https://github.com/bgamari/hphoton/blob/master/hphoton-fpga-timetagger/HPhot...