joneshf / purescript-option

MIT License
37 stars 15 forks source link

Fix behavior of `Option.set'`/`Option.recordSet` #42

Closed joneshf closed 3 years ago

joneshf commented 3 years ago

We want to remove values when they're Data.Maybe.Nothing.

The previous behavior is unintuitive and has caught people off guard. Instead of keeping it, we make it more consistent with how other record-based operations work: If the value is Data.Maybe.Nothing, we remove the previous value (if it was set).

Hopefully, this is more intuitive to everyone.