// Sass.
@use 'sass:list';
// Status: DONE
// The `list.first()` function returns the first element of `$list`.
// @param `$list` The list to get the first element from.
// @return The return value is the first element of `$list`.
@function first($list) {
@return if(type-of($list) == list, list.nth($list, 1), $list);
}
// Examples.
// @debug first(('a', 'b', c, d, 2, 4, 5, (a: 1))); // a
// @debug first(((a: 1), 'b', c, d, 2, 4, 5, (a: 1))); // (a: 1)