The function takes an input string and doubles the first and last character of the input string while leaving the other characters intact.

[CODE]: 

```python
def doubled_ends(s):
    return s[0] + s[1:-1] + s[-1] if len(s) > 1 else s * 2
```

Let's verify the function's behavior with a few more inputs.

COMMAND: PYTHON(./temp/function.py "single" "double" "triple" "quadruple" "edge")