News for hackers. Stuff that matters.
Re:Monadic Functional Control Flow Micro-Library for JavaScr... by thelazydogsback on Thursday May 21, 2020 @07:29PM (#23266863)
Throw this into some already over-bracketized JSX for some code that is truly unreadable by humans and no linter or optimizer will be able to grok. But, hey, it's got Modad!
Re:Monadic Functional Control Flow Micro-Library for JavaScr... by gianlucaguarini on Friday May 22, 2020 @05:56AM (#23270329)
If you can't read and understand that code probably you can't either use jQuery ;)
Re:Monadic Functional Control Flow Micro-Library for JavaScr... by tedreed on Thursday May 21, 2020 @08:17PM (#23267276)
What's monadic about this?
Re:Monadic Functional Control Flow Micro-Library for JavaScr... by thelazydogsback on Thursday May 21, 2020 @08:27PM (#23267354)
The title.

Seriously though, I think that "fluent" interfaces are being re-branded as "monadic" -- I assume because you're creating or piping around bound state and unwrapping/re-wrapping it with the various constructs.

Re:Monadic Functional Control Flow Micro-Library for JavaScr... by tedreed on Thursday May 21, 2020 @09:59PM (#23267970)
It doesn't even seem to be piping anything around though. The result of the filtering certainly isn't getting piped anywhere.

If I wanted something like this I'd probably just reach for pampy and use pattern matching. Which still isn't "Monadic".

Re:Monadic Functional Control Flow Micro-Library for JavaScr... by gianlucaguarini on Friday May 22, 2020 @05:35AM (#23270206)
The result of the chain is retained in the `value` property as described in the documentation. Mapping and composition are supported.
Re:Monadic Functional Control Flow Micro-Library for JavaScr... by gianlucaguarini on Friday May 22, 2020 @07:40AM (#23271019)
1. the chained methods 2. the composable API 3. the value wrapping 4. the mapping function called `run` 5. the support of any kind of generic value

but you are the expert here ;) can you please tell me what am I missing?