These are chat archives for ramda/ramda
After reading about Maybe, and watching Railway Oriented Programming I'm seeing NaN in a whole different light.
NaN * 50 == NaN is kind of like
Maybe(Number) * 50. In the broadest sense. It doesn't thrown an error. Its not a very precise comparison, but it struck me as interesting.
Maybes to see how fun it is after the honeymoon is over
NaNswallows any other numeric operations you try to do with it, and always returns
Oh I meant, from String's perspective, NaN is a valid subject. But NaN's perspective it is an invalid Number.
The string consuming it is the object choosing the validity of the subject, but imagine if NaN could retain its invalidity after a String(NaN), then the subject would be deciding its own invalidity, which reminds me of dispatching to a types internal map implementation
union-typelibrary, or any others out there?
union-typeis used a lot in https://github.com/paldepind/functional-frontend-architecture
R.over(R.lensProp('y'),f)(x)might be what you're looking for?
filterworks for any Filterable, but how can I get a
filterIndexedfunction that works for any Filterable that has indexes? Is there some notion of Indexable in Ramda?
((x) => !!x)the function you would like to use in
['foo', 'bar', 'baz']to
[[0, 'foo'], [1, 'bar'], [2, 'baz']](and use
R.toPairsto get from
Pair String a).