I want to make something like it (Nemerle syntax)
def something =
match(STT)
| 1 with st= "Summ"
| 2 with st= "AVG" =>
$"$st : $(summbycol(counter,STT))"
on F# so is it real with F#?
$"$st : $(summbycol(counter,STT" /> $"$st : $(summbycol(counter,STT" /> $"$st : $(summbycol(counter,STT"/>
If I understand you correctly, you'd like to assign some value to a variable as part of the pattern. There is no direct support for this in F#, but you can define a parameterized active pattern that does that:
The string after
Letis a parameter of the pattern (and is passed in as value ofv). The pattern then returns a tuple containing the bound value and the original value (so you can match the original value in the second parameter of the tuple.