Skip to main content
5 events
when toggle format what by license comment
Dec 5, 2019 at 10:35 vote accept heapOverflow
Jan 21, 2019 at 12:20 comment added Sebastiaan I'm not sure how much prelude-ts is used in real world projects, I can see that it is downloaded a lot, and it describes a section that indicates that it looked at related libraries as well, all of which use the option monad this way. Prelude-ts may or may not be canonical, but it's way of defining the option monad is used by many. The match function is coming from pattern matching like in Haskell and Scala; indeed it is a bit distant from javascript, but it is closer to several strongly typed languages. I cannot say how canonical it is, but I like it!
Jan 17, 2019 at 14:19 comment added heapOverflow Very interesting! My 2 questions would be1) when you say prelude-ts is canonical, do you mean it's commonly used in real world project? Do you know some open source project using it? 2) By taking a look at the project on github, it appears that the suggested way to check an option value would be with the match function. Is it correct? In that case it looks a little bit "distant" from standard javascript/typescript.
Jan 17, 2019 at 13:30 review First posts
Jan 17, 2019 at 13:54
Jan 17, 2019 at 13:25 history answered Sebastiaan CC BY-SA 4.0