def index(list, value)
      index = list.to_a.index {|e| e.eq(value).to_bool}
      index ? number(index + 1) : null
    end
def index(list, value)
      index = list.to_a.index {|e| e.eq(value).to_bool}
      index ? number(index + 1) : null
    end
Returns the position of a value within a list. If the value isn't found,
 returns `null` instead.

 Note that unlike some languages, the first item in a Sass list is number
 1, the second number 2, and so forth.

 This can return the position of a pair in a map as well.

 @example
   index(1px solid red, solid) => 2
   index(1px solid red, dashed) => null
   index((width: 10px, height: 20px), (height 20px)) => 2
 @overload index($list, $value)
   @param $list [Sass::Script::Value::Base]
   @param $value [Sass::Script::Value::Base]
 @return [Sass::Script::Value::Number, Sass::Script::Value::Null] The
   1-based index of `$value` in `$list`, or `null`