I'm preparing for a job as a junior/intermediate JS developer. I'm comfortable with my ability to think in higher-order functions, but less confident in my syntax and style (I have more experience in Clojure, ClojureScript). This is simple but I welcome your comments.

```
import { Map } from 'immutable';

const coinChanger = (d, m) => { // d for denominations, m for money
  const denoms = d.sort((a,b) => b-a)
  const coinCounter = (coin, amount) => {
    const coins = Math.floor(amount / coin);
    const remainder = amount % coin;
    return Map({}).set(coin, coins).set("remainder", remainder);
  };
  const coinMap = denoms.reduce((result, coin) => {
    const amount = result.get("remainder"); 
    const coinCount = coinCounter(coin, amount); 
    return result.merge(coinCount);
  }, Map({"remainder": m}));
  return coinMap;
};

console.log(coinChanger([1, 5], 11));
console.log(coinChanger( [25, 10, 5, 1], 192 ));
console.log(coinChanger([25, 2], 105));

```