941 karma · joined February 14, 2009
https://www.jetpens.com/Kokuyo-Campus-Soft-Ring-Notebook-Sem...
['10', '10', '10'].map(parseInt) === [10, NaN, 2]Maybe it's because non-FP languages typically don't support operator overloading, so you'd end up with verbose grammars like:
new Literal("true").or(new Literal("false"))
and then you'll probably use a parser generator like ANTLR.This is no longer true in Scala 3, so there will be no such limit: http://dotty.epfl.ch/docs/reference/dropped-features/limit22...
Prelude> s ->> f = f s
Prelude> [1..100] ->> take 10 ->> filter (not . odd) ->> drop 3
[8,10](Unless you mean something different).
If this chain of calls supposedly handles Nones at any level, then .map is not the right method. It should be .flatMap (or .bind). Unless this is a magic .map that handles either X or Maybe[X] and even exceptions (just like JS promises). This flexibility may be convenient and I can appreciate its pythonicness, but it's not really in the spirit of typed FP.
Sometimes it's work related, sometimes it's hobbies, sometimes is chores. It's hard to e.g. "just enjoy" not paying a bill that's already due. To want to get that done it's hardly an obsession, and not being able to succeed in finishing such a simple task is really frustrating.
Think for example about learning about the "iterator" abstraction. It's just something with "hasNext" and "next" operations, nothing more to understand. But when you know it you start seeing iterators everywhere, and you get frustrated when something that should be an iterator isn't so you cannot write a simple foreach loop. And you'll start implementing iterators in your own code, because you know that provides a lot of convenience for free to consumers.
Same thing for monoids. They're everywhere, they offer some convenience for free, and you'll be wondering why things that should have monoid instances don't.
I agree. Too cute for its own sake.