ozra / onyx-lang

The Onyx Programming Language
Other
97 stars 5 forks source link

Enumerable.some? #68

Closed stugol closed 8 years ago

stugol commented 8 years ago
say [nil].any?    -- prints "false"

This is a bit odd. At the very least, we should have a logical counterpart to empty?:

class Enumerable
   empty? -> length == 0
   some? -> length > 0
ozra commented 8 years ago

Continually sharing the module universe with Crystal is of utmost importance. Additional code can be added to Onyx stdlib additions, but should be done with discretion to avoid unnecessary future incompatibilities. Stdlib additions should therefore primarily be discussed and PR'ed to Crystal repo.