lib/shrink.js
function arrayToRoseTrees(array, fun) {
  return array.map(function(element) {
    return new RoseTree(element, function() { return fun(element); });
  });
}
function arrayToRoseTrees(array, fun) {
  return array.map(function(element) {
    return new RoseTree(element, function() { return fun(element); });
  });
}
Given array and fun, returns an array of rose trees where each tree's root is the element and its children are fun(element). [a] -> (a -> [a]) -> RoseTree a