Post History
Ruby, 14 bytes ->{_1|[]in[_]} Alternative solution: ->a{!(a|a)[1]} Try this online! Couple of other solutions I developed: ->a{!a.uniq[1]} # 15 bytes ->{!(_1|[])[1]} # 15...
Answer
#4: Post edited
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- Alternative solution:
- ```ruby
- ->a{!(a|a)[1]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
- Couple of other solutions I developed:
- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
->a{(a|[]).one?} # 16 bytes- ```
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- Alternative solution:
- ```ruby
- ->a{!(a|a)[1]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
- Couple of other solutions I developed:
- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
- ->a{(a|a).one?} # 15 bytes
- ```
#3: Post edited
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
- Couple of other solutions I developed:
- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
- ->a{(a|[]).one?} # 16 bytes
- ```
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- Alternative solution:
- ```ruby
- ->a{!(a|a)[1]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
- Couple of other solutions I developed:
- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
- ->a{(a|[]).one?} # 16 bytes
- ```
#2: Post edited
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
Couple of other bytes solutions I developed:- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
- ->a{(a|[]).one?} # 16 bytes
- ```
- # [Ruby](https://www.ruby-lang.org/), 14 bytes
- ```ruby
- ->{_1|[]in[_]}
- ```
- **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)**
- Couple of other solutions I developed:
- ```ruby
- ->a{!a.uniq[1]} # 15 bytes
- ->{!(_1|[])[1]} # 15 bytes
- ->a{(a|[]).one?} # 16 bytes
- ```
#1: Initial revision
# [Ruby](https://www.ruby-lang.org/), 14 bytes ```ruby ->{_1|[]in[_]} ``` **[Try this online!](https://ato.pxeger.com/run?1=m72kqDSpcsHiNNuYpaUlaboW63TtquMNa6JjM_Oi42NrIYI3JxYopEVHG-pAYWysgrKCrp1CSVFpKhdYygAsYaZjDpNKS8wphsqBlMMAmjYkGYhUaV5KalpmXmqKRmV-qUJKvkJefolCXmpqikJJvkJGYl5KTqpCSUZmsSbEYQsWQGgA)** Couple of other bytes solutions I developed: ```ruby ->a{!a.uniq[1]} # 15 bytes ->{!(_1|[])[1]} # 15 bytes ->a{(a|[]).one?} # 16 bytes ```