Racket, 22 bytes
(λ(n)(takef n even?))
The λ character is counted as 2 bytes.
I haven't seen Racket used before in any of the code golfing answers I've seen, so I had to do it at least once!
Steven H.
- 3k
- 12
- 22
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange(λ(n)(takef n even?))
The λ character is counted as 2 bytes.
I haven't seen Racket used before in any of the code golfing answers I've seen, so I had to do it at least once!