
<div class="code-block">
  <div class="code-block__wrapper" data-syntax="scss">
```scss
/// Compute the maximum depth of a map
/// @param {Map} $map
/// @return {Number} max depth of `$map`
@function map-depth($map) {
  $level: 1;

  @each $key, $value in $map {
    @if type-of($value) == 'map' {
      $level: max(map-depth($value) + 1, $level);
    }
  }

  @return $level;
}
```
  </div>
  <div class="code-block__wrapper" data-syntax="sass">
```sass
/// Compute the maximum depth of a