Post History
Ruby, 8 bytes ->n{n%2} Generic mod-in-a-lambda solution. Alternately, for 2.7+: ->{_1%2} Try it online!
Answer
#1: Initial revision
# [Ruby], 8 bytes ```ruby ->n{n%2} ``` Generic mod-in-a-lambda solution. Alternately, for 2.7+: ```ruby ->{_1%2} ``` [Try it online!][TIO-kqigwnfp] [Ruby]: https://www.ruby-lang.org/ [TIO-kqigwnfp]: https://tio.run/##KypNqvyfpmD7X9curzpP1aj2f0FpSbGCkqGCrp2CcnWanoahZq0SF0TQCC5ohBA0hgsaIwRN4IImQMH/AA "Ruby – Try It Online"