Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern matching? #1

Open
marceloboeira opened this issue Jul 18, 2017 · 0 comments
Open

Pattern matching? #1

marceloboeira opened this issue Jul 18, 2017 · 0 comments

Comments

@marceloboeira
Copy link
Owner

marceloboeira commented Jul 18, 2017

count = option(UnsafeIO::User.new.count)

case count
when is_some(0..Int32::Infinity)
  puts "#{users} signed up"
when is_none
  puts "no users signed up yet"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant