These are chat archives for evhub/coconut

29th
Oct 2017
Torsten Schmits
@tek
Oct 29 2017 13:54
def f() =
     case 1:
         match 2: 3
     else: 4
how do I make something like this work?
so that the return values are 3 or 4
Evan Hubinger
@evhub
Oct 29 2017 19:06

@tek Until #190 is implemented, your options are either

def f(1) = 2
@addpattern(f)
def f(3) = 4

or

def f(x):
    case x:
        match 1:
            return 2
        match 3:
            return 4
Torsten Schmits
@tek
Oct 29 2017 19:07
ah, not implemented yet
I used your first solution in the meantime