README
Counts occurrences of values. :package: :smiley_cat: :running: :vhs: :moon: :scroll: :newspaper: :blue_book:
This is part of package extra-lists.
lists.countAs(x, [fm]);
// x: lists
// fm: map function (v, k, x)
// → Map {value => count}
const lists = require('extra-lists');
var x = [['a', 'b', 'c', 'd', 'e'], [1, 1, 2, 2, 4]];
lists.countAs(x);
// Map(3) { 1 => 2, 2 => 2, 4 => 1 }
var x = [['a', 'b', 'c', 'd'], [1, 2, 3, 4]];
lists.countAs(x, v => v % 2);
// Map(2) { 1 => 2, 0 => 2 }