Questions about common FP functions
See original GitHub issueHi @mobily, the library looks really interesting! I’m quite interested in trying it out for future projects. I just have a couple of questions about certain functions, and I hope this is the right place to ask.
- How would you do Clojure’s
assoc
anddissoc
withts-belt
? Would it have to beD.merge(m, {k: v})
andD.rejectWithKey(m, (_, key) => key == k)
? - I noticed that
D.xxxWithKey
’s signature is(v, k)
instead of the usual (or rather what I would expect to be)(k, v)
. Is that just a matter of personal preference or rather a convention from another library/language that I’m not familiar with? - On Remeda, the doc says “Due to the lazy evaluation, it’s also unclear how to use some utility functions within the pipeline.” Does this mean that
ts-belt
does eager evaluation? So something like, say,pipe(m, D.toPairs, A.take(2))
would iterate through all the key-value pairs first before taking the first two elements?
Also, something like Remeda’s mapping doc would be very helpful to newcomers! I’m happy to chip in if you think it’d be useful.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
What is Functional Programming | Interviewkickstart
In other words, FP is an approach to software construction based on creating pure functions. FP helps in solving problems where many different...
Read more >Question Everything | alvinalexander.com
FP applications consist of only immutable values and pure functions. Pure function means that (a) a function's output depends only on its input...
Read more >FP interview - gists · GitHub
These are some questions to give a sense of what you know about FP. ... Nuts and bolts; Reasoning about types; Knowledge of...
Read more >Software Engineering | Calculation of Function Point (FP)
Function Point (FP) is an element of software development which helps to approximate the cost of development early in the process. It may ......
Read more >FP in JavaScript, questions about an approach. - Reddit
This is a JavaScript question, but I think it fits FP (and trying to find enlightenment) in general. I've been trying to write...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ad 2. it’s been fixed and published in
v3.1.1
🚀👋 hey again @anthony-khong!
I did some changes to improve this process, so basically, for development purposes, you can use the following commands:
⬆️ this command will build a single module (in this case
Dict
) and runset
tests⬆️ this command will be useful if you change a single test file (in this case
Dict/set.test.ts
)