Is it possible to pass case patterns as parameters to other functions? Something like this:
def foo(pattern: someMagicType) {
x match {
pattern => println("match")
}
}
def bar() {
foo(case List(a, b, c))
}
Is it possible to pass case patterns as parameters to other functions? Something like this:
def foo(pattern: someMagicType) {
x match {
pattern => println("match")
}
}
def bar() {
foo(case List(a, b, c))
}