On Thursday, February 23, 2017 at 10:16:21 AM UTC, Rupert Smith wrote: > > What would correspond more directly with the behavioral types, might be to > put the actual operations in the records. >
To avoid encapsulating functions in the model, another approach is to put the functions in a module, and then to hide the type within the module. Then the type becomes an abstract thing that can only be manipulated by the exposed functions, ensuring that its correct behavior is enforced. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
