It would be exceptionally useful to be able to assign values to variables, either from other variables or the results of functions. This feature is under discussion for the next version of SPARQL (http://www.w3.org/2009/sparql/wiki/Feature:Assignment), and already exists in ARQ. This could be used to avoid some messy UNION / OPTIONAL blocks, or to return substrings as query results, or many other useful things.