[erlang-questions] Why can't you have a variable before a string with pattern matching?

Jordan Wilberding diginux@REDACTED
Thu May 31 19:37:14 CEST 2007


I was just wondering why having

fcn("text" ++ String) -> ..

is legal, but doing

fcn(String ++ "text")

is not legal. Is this for performance reasons, or something else?

Jordan Wilberding

More information about the erlang-questions mailing list