
6 Apr
2014
6 Apr
'14
12:28 p.m.
Am 04/06/2014 04:05 PM, schrieb Daniel Trstenjak:
data StringState = Resting | Oscillating ...
data Guitar = Guitar { string1 :: StringState , string2 :: StringState ... }
Yes this, and also the information on which fret the finger is. The problem with this approach is that I end up with two representations of GuitarString. One is the accessor functions above, but there is also a datatype GuitarString which I need to express things like "put your finger on the nth fret of the mth string". I found myself mapping between these two representations, which is not hard to do, but it impairs clarity.