Back in the day
I wanted to convert
into
I now need to do the reverse and came up with this custom reporter
But I'm struggling to name it so looking for suggestions
Back in the day
I wanted to convert
into
I now need to do the reverse and came up with this custom reporter
But I'm struggling to name it so looking for suggestions
"compact" or "group" by key ?
Either combine values by keys of $list::lists reporter
or merge sub-arrays of $list::lists reporter
?
V4
I've been adding in some case sensitivity
So starting with this source
Simple group combines all the b (or B) into one row
But case sensitive option seperates the b from the B
cant you just set [case sensitivity V] to <t>
?
Back in the day, I'd believed that not all blocks obeyed the case-sensitivity setting so I've always avoided using it and rolled by own case sensitve code
But testing out
I can see that this block does so I'll have a go at re-writing it and see what happens
The basic function lends itself very well to a recursive definition:
Case sensitivity: see @sathvikrias’s post.
Summation (or any other function to be applied on the tail of a list):
Demo
The other reason for avoiding using the set case sensitivity flag is that it applies to all blocks in a program and therefore could have unexpected side affects in other scripts.
Lovely looking code - I really wish I had the ability to think in recursion easily
For completeness - this was my first simple method of doing it
But I decided to try and re-make it using HOF
So I've redone the HOF version to just use the
which reduces the number of helper blocks needed considerably (and simplifies everything)
So I've come up with this to allow use to choose what function to apply to the grouped values
If you leave it blank it just groups
And you can add it things like sum
And it can handle compound operations as well
This has a workaround for the issues in this thread for discussion on issues of applying functions on tails of lists
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.