Thank you Richard for rescuing my confused attempt. ^_^
I'd like to add another example, hopefully better explained:
Given:
type alias RuleContentAnd a =
{ a
| category : Category
, name : String
, template : Template
, view : View
, arguments : List Argument
}
type alias RuleContent =
RuleContentAnd {}
type alias Rule =
RuleContentAnd { id : Id }
Converting from one to the other is pure boilerplate:
ruleToRuleContent : Rule -> RuleContent
ruleToRuleContent rule =
{ arguments = rule.arguments
, name = rule.name
, template = rule.template
, view = rule.view
, category = rule.category
}
I would like to be able to write something like
ruleToRuleContent : Rule -> RuleContent
ruleToRuleContent rule =
removeAttribute .id rule
--
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.