```// 1 parameterRegex.matchEntire(toParse)?.run {...
# codingconventions
e
Copy code
// 1
parameterRegex.matchEntire(toParse)?.run {
    require(groupValues.size == 3)
    val (parameter, value, rest) = destructured
    parameters[parameter] = value
    return parse(rest)
}
or
Copy code
// 2
parameterRegex.matchEntire(toParse)?.let {
    require(it.groupValues.size == 3)
    val (parameter, value, rest) = it.destructured
    parameters[parameter] = value
    return parse(rest)
}
1️⃣ 1
2️⃣ 4
a
we can omit
return
in the first one
Copy code
// 1
parameterRegex.matchEntire(toParse)?.run {
    require(groupValues.size == 3)
    val (parameter, value, rest) = destructured
    parameters[parameter] = value
    parse(rest)
}