You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code listings found here and here are generally speaking ok, but if you copy paste them directly to your project you will probably get squiggly lines. In particular this method
// Local function for composing a new lens from 3 other lensesLens<Person,ApptState>setState(intid)=>
lens(Person.appts,Map<int,Appt>.item(id), Appt.state);
Map might refer to Prelude.Map (a method) and LanguageExt.Map (a type). Chances are higher that you will miss 5-10 minutes fiddling with your code why it doesn't work until you decide to decompile it and since it involves code generation it becomes more obscure to the untrained eye of this library. Therefore the improvement I propose is to include the namespace like so:
// Local function for composing a new lens from 3 other lensesLens<Person,ApptState>setState(intid)=>
lens(Person.appts, LanguageExt.Map<int,Appt>.item(id), Appt.state);
Aside from this fix, I do propose to include another gist for the source generated code also for this example (like Click here to see the generated code) and also for [WithLens] section - that basically introduces the With method on A. What might be evident to some, might seem magic to first time visitors that want to take a grasp on what's going on in the library
The text was updated successfully, but these errors were encountered:
The code listings found here and here are generally speaking ok, but if you copy paste them directly to your project you will probably get squiggly lines. In particular this method
Map
might refer toPrelude.Map
(a method) andLanguageExt.Map
(a type). Chances are higher that you will miss 5-10 minutes fiddling with your code why it doesn't work until you decide to decompile it and since it involves code generation it becomes more obscure to the untrained eye of this library. Therefore the improvement I propose is to include the namespace like so:Aside from this fix, I do propose to include another gist for the source generated code also for this example (like Click here to see the generated code) and also for [WithLens] section - that basically introduces the
With
method onA
. What might be evident to some, might seem magic to first time visitors that want to take a grasp on what's going on in the libraryThe text was updated successfully, but these errors were encountered: