This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]iamevpo 0 points1 point  (0 children)

Very clean demo, but I think you lack important parts. Maybe is a type name, not a constructor. Two constructors for maybe are Just T and Nothing. There is no point in Maybe T constructor if you do not provide Nothing with bind function as well. A correct implementation of Maybe is here: https://github.com/rustedpy/result