Add `isDirty` command
amitaibu opened this issue · comments
Removed this part from #2 , and added a proper issue to it :)
Maybe we should add something like this?:
isDirtyWith : Editable record -> (record -> record -> Bool) -> Bool
isDirtyWith editableRecord compareFunc =
case editableRecord of
ReadOnly _ ->
False
Editable originalRecord updatedRecord ->
compareFunc originalRecord originalRecord
isDirty : Editable record -> Bool
isDirty editableRecord =
isDirtyWith editableRecord (==)
@amitaibu I like this!