bryanedds/Prime

Inquire to StackOverflow on how to get my PropertyTag lensing to work.

Closed this issue · 1 comments

// NOTE: failed lensing experiment - can't get the damn types to work out...
//
//let inline addEqual<'a, 'w when 'a : (static member (+) : 'a * 'a -> 'a)> (property : PropertyTag<'a, 'w>) (value : 'a) (world : 'w) : 'w =
// match property.SetOpt with
// | Some set -> set (property.Get world + value) world // NOTE: for some reason, F# is not forwarding the 'a constraint to the Get member...
// | None -> world
//
//let inline (+=) (left, right) = addEqual left right

I ended up figuring this out.