All Questions
6 questions
4
votes
1
answer
85
views
Finding optimal mapping patterns that transform relational data into a linear format
I'm trying to upgrade my javascript to be more functional. I have used function composition and curry successful on less complicated code but i'm now running into a point where i'm not sure on how to ...
3
votes
3
answers
76
views
Counting duration values
I have a durations as such:
[{'duration': 3600}, {'duration': 3600}]
And I want the output to be ...
2
votes
0
answers
108
views
Set manipulation (javascript arrays) using lodash
I'd like a more elegant and readable (if possible using functional programming style) for collection filtering (groupToAdd and groupToDelete collection handling)
Just getting rid of multiple _....
0
votes
1
answer
86
views
Filtering/mapping strategies
This is real JavaScript/Lodash code used in a project I'm currently working on, but actually this particular question bothers me quite often regardless of the language. Say, I need to generate some ...
11
votes
1
answer
228
views
Hunt the wumpus: Functional JavaScript (Node) with Lodash
I'd like a code review of the following simple implementation of the classic game Hunt the Wumpus
I'm trying to use JavaScript in the most "functional" way. To help me, I'm using lodash and ES6.
<...
7
votes
2
answers
5k
views
"Invert" a JavaScript object hash whose values are arrays to produce a new object hash with keys as the elements of those original value vectors
Background
lodash and underscore have an invert function that takes an object hash and converts it to a new one, which has keys as the input object's values and ...