{c{1/0} ?: 0}
This commit is contained in:
parent
1c8e1972b6
commit
75322276a9
|
@ -5,7 +5,7 @@ import java.util.regex.Pattern
|
||||||
|
|
||||||
// simplified switch/case pattern matching
|
// simplified switch/case pattern matching
|
||||||
Object.metaClass.match = { Map cases -> def val = delegate; cases.findResult { switch(val) { case it.key: return it.value} } }
|
Object.metaClass.match = { Map cases -> def val = delegate; cases.findResult { switch(val) { case it.key: return it.value} } }
|
||||||
def x(c) { try { c.call() } catch (Throwable e) { null } }
|
def c(c) { try { c.call() } catch (Throwable e) { null } }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue