dbrattli/Expression

Feature request: implement hash for `Some`, `Result` and `default_with` to generate default value lazily.

Closed this issue · 1 comments

I would be very nice to implemenet hash for those core types, like Option and Result?

__hash__(self) = hash(self._value)
default_with(f) = or_else_with(lambda x: Some(f(x)).value

need help/accept PR?

Yes, please. That would be great!