Groovy web console

subscribe to the feed Subscribe
to this
Groovy logic (via #groovywebconsole)
tweet this snippet Tweet

Groovy logic

Published 1 year ago by Youbze with tags wtf logic behavior broken
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
dalist = [BigInteger.valueOf(42)]
println "42 is in dalist ? " + (42 in dalist).toString()
println "42 is the first element of dalist ? " + (42 == dalist[0]).toString()