Skip to content

Commit

Permalink
chore@small
Browse files Browse the repository at this point in the history
  • Loading branch information
Deyan Totev committed Jan 25, 2024
1 parent 95d0348 commit b60c1b5
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 56 deletions.
65 changes: 28 additions & 37 deletions NEXT_VERSION_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
- insert
- insertAll
- lt
- lte


- invert
- invertObj
- invoker
- isNotNil
- pickBy
- pathSatisfies
- swap
- mergeDeepLeft

run immutable script

Expand Down Expand Up @@ -74,59 +76,48 @@ group TS test for similar methods
- construct - it is class helper and classes are not very functional oriented
- constructN
- into - no support for transducer as it is overly complex to implement, understand and read.




- keysIn
- invert - overly complicated and limited use case
- invertObj
- invoker
- keysIn - we shouldn't encourage extending object with `.prototype`
- lift
- liftN
- lt
- lte
- mapAccum
- mapAccum - `Ramda` example doesn't looks convincing
- mapAccumRight
- memoizeWith
- mergeDeepLeft
- mergeDeepWith
- memoizeWith - hard to imagine its usage in context of `R.pipe`/`R.compose`
- mergeDeepWith - limited use case
- mergeDeepWithKey
- mergeWithKey

- nAry
- nthArg
- o
- otherwise
- pair
- partialRight
- pathSatisfies
- pickBy
- nAry - hard to argument about and hard to create meaningful TypeScript definitions
- nthArg - limited use case
- o - enough TypeScript issues with `R.pipe`/`R.compose` to add more composition methods
- otherwise - naming is confusing
- pair - `left-pad` types of debacles happens partially because of such methods that should not be hidden, bur rather part of your code base even if they need to exist.
- partialRight - I dislike `R.partial`, so I don't want to add more methods that are based on it
- pipeWith
- project
- project - naming is confusing, but also limited use case
- promap

- reduceRight
- reduceWhile
- reduceRight - I find `right/left` methods confusing so I added them only where it makes sense.
- reduceWhile - functions with 4 inputs - I think that even 3 is too much
- reduced
- remove
- scan
- remove - nice name but it is too generic. Also, `Rambdax` has such method and there it works very differently
- scan - hard to explain
- sequence
- splitWhenever
- swap
- symmetricDifferenceWith

- andThen
- toPairsIn
- transduce
- traverse
- unary
- uncurryN
- unfold
- unionWith
- unfold - similar to `R.scan` and I find that it doesn't help with readability
- unionWith - why it has its usage, I want to limit number of methods that accept more than 2 arguments
- until
- useWith
- useWith - hard to explain
- valuesIn
- xprod
- xprod - limited use case
- thunkify
- default
---
Double check

Expand Down
40 changes: 40 additions & 0 deletions files/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5855,6 +5855,26 @@ Notes:
// @SINGLE_MARKER
export function gt<T>(x: T): T;

/*
Method: lt
Explanation:
Example:
```
const result = [R.lt(2, 1), R.lt(2, 3)]
// => [false, true]
```
Categories: Number
Notes:
*/
// @SINGLE_MARKER
export function lt<T>(x: T): T;

/*
Method: gte
Expand All @@ -5871,6 +5891,26 @@ Categories: Number
Notes:
*/
// @SINGLE_MARKER

export function lte<T>(x: T): T;
/*
Method: lte
Explanation:
Example:
```
const result = [R.lte(2, 1), R.lte(2, 2), R.lte(2, 3)]
// => [false, true, true]
```
Categories: Number
Notes:
*/
// @SINGLE_MARKER
export function gte<T>(x: T): T;
Expand Down
9 changes: 0 additions & 9 deletions source/gt.spec.js

This file was deleted.

10 changes: 0 additions & 10 deletions source/gte.spec.js

This file was deleted.

6 changes: 6 additions & 0 deletions source/lt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function gt(a, b){
if (arguments.length === 1)
return _b => gt(a, _b)

return a < b
}
6 changes: 6 additions & 0 deletions source/lte.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function lte(a, b){
if (arguments.length === 1)
return _b => lte(a, _b)

return a <= b
}

0 comments on commit b60c1b5

Please sign in to comment.