Closed
Description
(Imported from http://code.google.com/p/diagrams/issues/detail?id=55. Original issue from [email protected] on September 23, 2011, 10:42:16 PM UTC)
This has several benefits:
- no need to annoyingly match on a pair when using withName
- boundaryFrom can be refactored to just work on one of these "located bounding functions" instead of taking the bounds and base point as separate arguments
- if we ever want to remember additional information for named diagrams we just have to add a new field to the data structure.
Of course, the downside is that if all you want is the point you have to use a projection function to get it out. But you already had to pattern match on a pair to get at it anyway, so maybe this isn't a downside at all -- with a projection function you don't have to remember which of the two components comes first in the tuple!
Don't forget to update the user manual to match.